hi..
1st this is my code
2nd if my button show

and when i click the button it show "20" at edittext and "A" at spinner. now it show like this..

how to edit my code??
1st this is my code
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
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim BD As BetterDialogs
Dim DR As Int
Dim Button1 As Button
Dim EditText1 As EditText
Dim Spinner1 As Spinner
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Layout1")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
'Custom dialog guna Better Dialog
Dim pnlTitle As Panel
pnlTitle.Initialize("")
pnlTitle.LoadLayout("pnldialog")
Dim pnlBody As Panel
pnlBody.Initialize("")
pnlBody.LoadLayout("pnldialog2")
Spinner1.AddAll(Array As String("A","B","C"))
Dim btnOK As Button
btnOK.Initialize("")
btnOK.Text = "OK"
Dim btnCancel As Button
btnCancel.Initialize("")
btnCancel.Text = "Batal"
DR = BD.CustomDialog(pnlTitle, -1, 60dip, pnlBody, 100%x, 15%y, 0, Null , btnOK, btnCancel, "", True, "CD1")
If DR = DialogResponse.POSITIVE Then
Button1.Text = EditText1.Text&Spinner1.SelectedItem
End If
End Sub
2nd if my button show

and when i click the button it show "20" at edittext and "A" at spinner. now it show like this..

how to edit my code??
Last edited: