hi,
In my app, i want to dispaly somthing on the right of select item like the attached pic shows.
so i must get the value of the select items' distance from the top.
i find in B4A lib,and read listview doc https://developer.android.google.cn/reference/android/widget/ListView of android.
I have got no idea how to get that distance value.
how to get the distance value?
Thanks
i find a function "getSelectedView" in android.
java.lang.Object
↳android.view.View
↳android.view.ViewGroup
↳android.widget.AdapterView<android.widget.ListAdapter>
↳android.widget.AbsListView https://developer.android.google.cn/reference/android/widget/AbsListView
getSelectedView added in API level 1
public View getSelectedView ()
Returns
View The view corresponding to the currently selected item, or null if nothing is selected
Another option would be to use xCustomListView. You could have a secondary view on the item layout for display which is set invisible.
On list selection click you then show the hidden view.
see attached sample .. I have included a variable to keep track of previously selected item to hide last displayed message.
alternatively, you could just programmatically add the label / view to the list panel at selection.