Sub Process_Globals
End Sub
Sub Globals
Dim scv As ScrollView
Dim Panel1,panel2,panel3 As Panel
Dim data_tmp(15) As EditText
Dim selection,idx As Int
Dim cd As CustomDialog2
Dim Button1 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Dim GD As GradientDrawable
GD.Initialize("BR_TL", Array As Int(Colors.Yellow, Colors.LightGray))
Panel1.Initialize("panel1")
Panel1.Background= GD
Activity.AddView(Panel1, 0, 0, 100%x, 100%y)
show_CustomDialog
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub show_CustomDialog
Dim lgn() As String
Dim lg() As Int
Dim label_t(10) As Label
Dim titre As String
Dim ret As Int
lgn = Array As String("1:", "2:","3","4:","5:","6","7","")
lg =Array As Int(100dip, 100dip,100dip,100dip,100dip,100dip,100dip,100dip)
titre="mon titre"
'button
Button1.Initialize("Button")
Button1.Text="8"
panel2.Initialize("panel2")
panel2.AddView(Button1,0dip,370dip, 70dip, 50dip)
For i= 0 To 7
label_t(i).Initialize ("label_t")
label_t(i).Text=lgn(i)
data_tmp(i).Initialize("label_tmp")
data_tmp(i).InputType=data_tmp(i).INPUT_TYPE_NUMBERS
data_tmp(i).SingleLine=True
data_tmp(i).Text="0"
panel2.AddView(label_t(i),5dip, 30dip+50dip*i , 150dip, 40dip)
panel2.AddView(data_tmp(i),90dip, 25dip+50dip*i , lg(i), 40dip)
Next
scv.Initialize(1000dip)
scv.panel.AddView(panel2,0,0,77%x,30dip+50dip*i)
scv.panel.Height = panel2.Height
cd.AddView(scv,77%x, 60%y)
ret = cd.show(titre, "OK", "CANCEL", "",Null)
If ret=-1 Then
'ok
Else
'cancel
End If
End Sub
Sub Button_Click
Dim GD As GradientDrawable
scv.FullScroll(False)
scv.Visible=False
panel3.Initialize("panel3")
GD.Initialize("TR_BL", Array As Int(Colors.DarkGray, Colors.LightGray))
panel3.Background= GD
cd.AddView(panel3,77%x,60%y)
End Sub