#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.
Type ItemValue1 (Lanel1 As Label, EditText1 As EditText)
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 IME As IME
Private CLV As CustomListView
Private Label1 As Label
Private EditText1 As EditText
'Private temp As List
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("main")
IME.Initialize("IME")
IME.AddHeightChangedEvent
For i=1 To 20
Dim iv1 As ItemValue1
iv1.Initialize
CLV.Add(CreateItem1(iv1,"test "&i),iv1)
Next
End Sub
Private Sub CreateItem1 (iv1 As ItemValue1, str As String) As B4XView
Dim p As Panel
p.Initialize("")
p.SetLayoutAnimated(0,0,0,100%x,20%y)
p.LoadLayout("card")
Label1.Text=str
Return p
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub IME_HeightChanged(NewHeight As Int, OldHeight As Int)
CLV.GetBase.SetLayoutAnimated(0,0,0,100%x,NewHeight)
CLV.Base_Resize (CLV.GetBase.Width, CLV.GetBase.Height)
End Sub