Ecco una nuova aggiunta, finestre di dialogo personalizzate, semplici e molto efficaci
esempio codice
Sotto trovate anche lo screen, poi appena finisco di scrivere help metto in linea
esempio codice
B4X:
#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
End Sub
Sub Globals
Dim imd As ClassMyDialog
Dim iml As ClassMyLayout
Dim Button1 As Button
Dim Button2 As Button
Dim Button3 As Button
Dim Button4 As Button
Dim Button5 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main")
iml.Initialize
imd.Initialize(Colors.Red,Colors.Black)
iml.SettingLayout(Activity)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
Dim btn As Button
btn.Initialize("btn1")
btn.Text = "Close"
Dim s, ss As String
s = "Basic4Android"
ss = "Have you Liked any post today? Each post has a small Like link. Somebody helped you? Like the post. It doesn't add clutter like posting 'Thank you' and this will also help the search engine return better results."
imd.Dialog01(Activity,s,ss,btn)
End Sub
Sub btn1_Click
imd.DialogClose()
End Sub
Sub Button2_Click
Dim btn1,btn2 As Button
btn1.Initialize("btn1")
btn1.Text = "Close"
btn2.Initialize("btn1")
btn2.Text = "Save"
Dim s, ss As String
s = "Basic4Android"
ss = "Have you Liked any post today? Each post has a small Like link. Somebody helped you? Like the post. It doesn't add clutter like posting 'Thank you' and this will also help the search engine return better results."
imd.Dialog02(Activity,s,ss,btn1,btn2)
End Sub
Sub Button3_Click
Dim listV As ListView
listV.Initialize("ListV")
For i = 0 To 10
listV.AddSingleLine("Line " & i)
Next
imd.Dialog03(Activity,listV)
End Sub
Sub Button4_Click
Dim listV As ListView
listV.Initialize("ListV")
listV.TwoLinesLayout.Label.TextSize = 14
listV.TwoLinesLayout.Label.TextColor = Colors.Yellow
listV.TwoLinesLayout.Label.Typeface = Typeface.DEFAULT_BOLD
listV.TwoLinesLayout.SecondLabel.TextSize = 12
listV.TwoLinesLayout.SecondLabel.TextColor = Colors.White
listV.TwoLinesLayout.SecondLabel.Typeface = Typeface.DEFAULT
For i = 0 To 10
listV.AddTwoLines("Line " & i,"Questo esempio non e formattato")
Next
imd.Dialog03(Activity,listV)
End Sub
Sub Button5_Click
Dim bmp As Bitmap
bmp.InitializeSample(File.DirAssets,"Android.png",32,32)
Dim listV As ListView
listV.Initialize("ListV")
listV.TwoLinesAndBitmap.Label.TextSize = 14
listV.TwoLinesAndBitmap.Label.TextColor = Colors.Yellow
listV.TwoLinesAndBitmap.Label.Typeface = Typeface.DEFAULT_BOLD
listV.TwoLinesAndBitmap.SecondLabel.TextSize = 12
listV.TwoLinesAndBitmap.SecondLabel.TextColor = Colors.White
listV.TwoLinesAndBitmap.SecondLabel.Typeface = Typeface.DEFAULT
For i = 0 To 10
listV.AddTwoLinesAndBitmap("Line " & i,"Questo esempio non e formattato",bmp)
Next
imd.Initialize(Colors.Black,Colors.ARGB(255,50,100,150))
imd.Dialog03(Activity,listV)
End Sub
Sub ListV_ItemClick (Position As Int, Value As Object)
imd.DialogClose()
End Sub
Sotto trovate anche lo screen, poi appena finisco di scrivere help metto in linea
Attachments
-
2013-10-23_104840.png73.3 KB · Views: 353
-
Libraries.zip32.2 KB · Views: 300
-
Screenshot_2013-10-23-16-34-50.png116.1 KB · Views: 276
-
Screenshot_2013-10-23-17-05-58.png120.8 KB · Views: 271
-
Screenshot_2013-10-23-17-18-46.png63.2 KB · Views: 282
-
603564_595299067200870_1363697325_n.jpg44.6 KB · Views: 365
-
1383545_595299157200861_81969202_n.jpg47.1 KB · Views: 286
Last edited: