Nov 12, 2015 Replies: 7 A ListView that allows the user to jump to a specific item based on the index. It is implemented as a custom view. You need to add a CustomView in the designer and set its CustomType to IndexedTable. Note that the items must be sorted. It is similar to this B4i class: https://www.b4x.com/android/forum/threads/class-indexedtable.60280/ Its performance is better as it creates a map that maps between the characters and the relevant items (instead of searching all the items each time). Attachments IndexedTable.zip IndexedTable.zip 11.3 KB · Views: 911 Click to expand...
A ListView that allows the user to jump to a specific item based on the index. It is implemented as a custom view. You need to add a CustomView in the designer and set its CustomType to IndexedTable. Note that the items must be sorted. It is similar to this B4i class: https://www.b4x.com/android/forum/threads/class-indexedtable.60280/ Its performance is better as it creates a map that maps between the characters and the relevant items (instead of searching all the items each time).
M Mahares Expert Licensed User Longtime User Nov 27, 2015 #2 On a small device the alphabetic index is very crowded as shown in this picture I changed the pnIndex from a panel to a scrollview in the IndexedTable class so I can expand the spacing between the letters, but could not get the touch event of the scrollview to move the listview to the corresponding letter when touched as seen below. Any hints on how to get the touch event to work on the scrollview and move the listview to the corresponding letter touched will be highly appreciated. The problem seems to be in this sub. It does not apply to scrollview: Private Sub pnlIndex_Touch(Action As Int, X As Float, Y As Float) I have attched the project: Thank you Attachments IndexedTable_With_Index_In_Scrollview.zip IndexedTable_With_Index_In_Scrollview.zip 16.3 KB · Views: 708 Last edited: Nov 27, 2015
On a small device the alphabetic index is very crowded as shown in this picture I changed the pnIndex from a panel to a scrollview in the IndexedTable class so I can expand the spacing between the letters, but could not get the touch event of the scrollview to move the listview to the corresponding letter when touched as seen below. Any hints on how to get the touch event to work on the scrollview and move the listview to the corresponding letter touched will be highly appreciated. The problem seems to be in this sub. It does not apply to scrollview: Private Sub pnlIndex_Touch(Action As Int, X As Float, Y As Float) I have attched the project: Thank you
S sorex Expert Licensed User Longtime User Nov 27, 2015 #3 for some reason I can't view these images. I need to login but this doesn't work either (user '' does not exist)
for some reason I can't view these images. I need to login but this doesn't work either (user '' does not exist)
Erel B4X founder Staff member Licensed User Longtime User Nov 29, 2015 #4 You can add a panel to the ScrollView and then handle its Touch event. A simpler approach can be to remove half of the characters (set their visible property to false). It will still be useful.
You can add a panel to the ScrollView and then handle its Touch event. A simpler approach can be to remove half of the characters (set their visible property to false). It will still be useful.
Croïd Active Member Licensed User Longtime User Dec 15, 2015 #5 For initialize Table without designer. I must add panel too ? Code: Table.initialize("","") Table.net.initialize("Table.net")
For initialize Table without designer. I must add panel too ? Code: Table.initialize("","") Table.net.initialize("Table.net")
Erel B4X founder Staff member Licensed User Longtime User Dec 15, 2015 #6 What is Table.net? You need to call Initialize and then DesignerCreateView with a panel (which will hold the list) and a label.
What is Table.net? You need to call Initialize and then DesignerCreateView with a panel (which will hold the list) and a label.
A Anser Well-Known Member Licensed User Longtime User Oct 3, 2018 #8 Is there a way to make the Visible property to False/True like any other views ? EDIT : Solved as follows Code: Dim Base As Panel = IndexedTable1.tv.Parent Base.Visible = False Last edited: Oct 3, 2018
Is there a way to make the Visible property to False/True like any other views ? EDIT : Solved as follows Code: Dim Base As Panel = IndexedTable1.tv.Parent Base.Visible = False