Don't use ListView.
Use xCustomListView - it is more powerful, easier to work with and cross platform.
Use xCustomListView - it is more powerful, easier to work with and cross platform.
Last edited:
I have been looking but can not find a way to go directly a certain row in a listview?
Such as listview1.selected(12) where 12 is the 12th item in the listview?
It is probably a simple way I just have not found it.
Have you installed agrahams help viewer ?ListView.GetItem
Method
Returns the value of the item at the specified position.
Returns the "return value" if it was set and if not returns the text of the first line.
Returns : Object
GetItem(Index As Int)
I am updating a MySql table and I just want the Listview to return the item that was clicked. Some list can be very long...
In my example below I just want the listview to show Item 15 and not be at the top to avoid scrolling.
ListView1.TwoLinesAndBitmap.ImageView.Gravity = Gravity.FILL
ListView1.SingleLineLayout.ItemHeight = 50dip
I recommend you to use CustomListView class. It will allow you to modify existing items.Also, how do I modify the text of each item through my program?
Unless your list is very long I recommend you to use CustomListView class instead of ListView. It can be easily modified.
:sign0085: Listview turns background black every time i scroll it. the text and functioning remains as it is only background color changes. this only happens on samsung galaxy tab(2.2.1) works fine on other devices with ICS.
any solution?
Sub search_FA_button_click
currentPage="searchFAlist"
Dim Position As Int
Dim Findrow As Int = Position
Dim Cursor15 As Cursor
Dim FA As String
FA=FA_ser.Text
If FA.Length=0 Then
ToastMessageShow("Please Fill the above field",False)
Else
'ToastMessageShow("search by FA",False)
Cursor15 = SQL1.ExecQuery("Select * FROM FAid WHERE Situation like '%"& FA &"%' ")
Cursor15.Position = Findrow
End If
If Cursor15.rowcount>0 Then
If FA.Length>0 Then
Activity.RemoveAllViews
Activity.RemoveView
Activity.LoadLayout("Flist.bal")
Activity.LoadLayout("faith.bal")
Dim moreinfoBtn As Bitmap
moreinfoBtn.Initialize(File.DirAssets, "moreinfobtn.png")
Dim sevr As String
sevr=""&Cursor15.GetString("Severity")
For i = 0 To Cursor15.RowCount - 1
Cursor15.Position = i
FA_s_lv.ScrollingBackgroundColor = Colors.White
FA_s_lv.TwoLinesAndBitmap.Label.TextSize = 15
FA_s_lv.TwoLinesAndBitmap.Label.TextColor = Colors.Black
FA_s_lv.TwoLinesAndBitmap.SecondLabel.TextSize = 13
FA_s_lv.TwoLinesAndBitmap.SecondLabel.TextColor = Colors.DarkGray
FA_s_lv.AddTwoLinesAndBitmap((Cursor15.GetString("Situation")),(Cursor15.GetString("Severity")),moreinfoBtn)
Next
ToastMessageShow("" &Cursor15.RowCount& " Results Found", False)
End If
Else
ToastMessageShow("No Results Found",False) 'in case cursor15 is empty
End If
End Sub