Android Question About ListView...again


Active Member
Licensed User
Longtime User
Hi guys, I have a ListView. I know how to use CustomlistViews and ScrollViews. I simply want to use a listview to improve my skills: I bet I will success... ;)
As Erel several times said, it is not possible to highlight the selected item of a listview.
But, someone discovered that IT IS POSSIBLE by calling (using RunMethod on listview JavaObject) the "setSelector" method. I tried and it works like a charm.
The only problem remains: how to select one item programmatically.
I thought that SetPosition(...) could do the job, but it does not.
Probably it could be used the "performItemClick" method called with 3 arguments;
1- The listview itself (or the item, by GetItemAt(...))
2 - The selected position
3 - The selected value
Calling the RunMethod, it always says the method call does not match
Is there a way to call "performItemClick" correctly in B4A for a ListView?
Thanks in advance

In java:

 public void setSelectedIndex(int position) {
   mDrawerList.performItemClick(mDrawerList.getChildAt(position), position, position);