Android Question How to get selected ListView name

ronovar

Active Member
Licensed User
Longtime User
I have two listviews in my activity...first listview have name (lvDays) and second have (lvDesc)...so i need to get when i press Left or Right button on remote control listview name that is selected (not item name, i need to get listview name)...how can i get this using B4A?
 

DonManfred

Expert
Licensed User
Longtime User
put the two into a global map. map.put("lv1", listbox1), map.put("lv2", listbox2)

on buttonklick get the right listbox from the map an work with it.
 
Upvote 0

ronovar

Active Member
Licensed User
Longtime User
i don't use button click...i have two listviews for epg...first listview is days and second is epg for selected day if user is in selected listvie days and press left it must call another activity...so i found this api:

B4X:
#If Java
import android.view.View;

public View getCurrentFocus() {
    return mWindow != null ? mWindow.getCurrentFocus() : null;
}
#End if

but B4A won't compile....when i select left or right listview it gets focus..using above getCurrentFocus() API i will get focused item name....could you please correct above code so that B4A compile?
 
Upvote 0
Top