Postingan

Menampilkan postingan dengan label Android

Cara membuat Android ImageView pada B4A

Gambar
Create B4A Project Go to Designer, add Image View   Generate member   this will add Sub Globals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. Private ImageView1 As ImageView End Sub Sub ImageView1_Click End Sub Sub ImageView1_LongClick End Sub save layout and load it 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 Add image file        add your code Sub Activity_Create(FirstTime As Boolean) 'Do not forget to load the layout file created with the visual designer. For example: Activity.LoadLayout("Layout1") ImageView1.Bitmap = LoadBitmap(File.DirAssets, "hardware.png") ImageView1.Tag=File.DirAssets & "hardware.png" End Sub Sub ImageView1_Click Log ("You Clicked " & ImageView1.Tag...

Cara membuat Android Listview pada B4A

Gambar
Create B4A Projecty G to designer, addview ListView   generate member   This will add Sub Globals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. Private ListView1 As ListView End Sub Sub ListView1_ItemClick ( Position As Int , Value As Object ) End Sub Sub ListView1_ItemLongClick ( Position As Int , Value As Object ) End Sub save your Layout and load it 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 Add your code Sub Activity_Create ( FirstTime As Boolean ) ' Do not forget to load the layout file created with the visual designer. For example : Activity.LoadLayout ( "Layout1" ) ListView1.AddSingleLine2 ( "Sunday" , 1 ) ListView1.AddSingleLine2 ( "Mon...