Hello.
I have one listview.
If clicked one line, show the value name and position number. Example:
How can pass the name "Private" to function?
Thanks very much
I have one listview.
If clicked one line, show the value name and position number. Example:
B4X:
boton1.Initialize("boton1")
boton1.TextColor = Colors.Black
boton1.Text = "Volver al MyList."
'panelg.AddView(boton1, 0dip, 0dip, 100%x, 9%y)
Bitmap1.Initialize(File.DirAssets, "1.png")
Bitmap2.Initialize(File.DirAssets, "2.png")
Bitmap3.Initialize(File.DirAssets, "3.png")
Bitmap4.Initialize(File.DirAssets, "4.png")
Bitmap5.Initialize(File.DirAssets, "5.png")
Bitmap6.Initialize(File.DirAssets, "6.png")
Bitmap7.Initialize(File.DirAssets, "7.png")
' Crea MyList (ListView)
MyList.Initialize("MyList")
MyList.Color=Colors.Black
MyList.TwoLinesLayout.ItemHeight = 50dip
MyList.TwoLinesLayout.Label.TextSize = 10dip
MyList.TwoLinesLayout.Label.TextColor = Colors.Blue
MyList.TwoLinesLayout.Label.Gravity = Gravity.CENTER
MyList.FastScrollEnabled=True
MyList.clear
MyList.AddTwoLinesAndBitmap("OneName", "Private",Bitmap1)
MyList.AddTwoLinesAndBitmap("TwoName", "Private", Bitmap2)
MyList.AddTwoLinesAndBitmap("ThreeName", "Private", Bitmap3)
MyList.AddTwoLinesAndBitmap("FourName", "Private", Bitmap4)
MyList.AddTwoLinesAndBitmap("FiveName", "Private", Bitmap5)
MyList.AddTwoLinesAndBitmap("SixName", "Private", Bitmap6)
MyList.AddTwoLinesAndBitmap("SevenName", "Private", Bitmap7)
Activity.AddView(MyList, 0dip, 0dip, 100%x, 420dip)
Activity.AddMenuItem("Back","boton_menu")
Sub listado_ItemClick (Position As Int, Value As Object)
Dim Myvariable = Position " & " Value
' Position is a number, example 1
' Value is name, example: OneName
How can pass the name "Private" to function?
Thanks very much