R ronovar Active Member Licensed User Longtime User Jun 10, 2016 #1 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?
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 Jun 10, 2016 #2 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
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.
R ronovar Active Member Licensed User Longtime User Jun 10, 2016 #3 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: Code: Copy #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
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: Code: Copy #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?
A Hasbullah Huda Member Licensed User Aug 20, 2016 #4 maybe i can help, use reflector Code: Copy Dim r As Reflector r.Target = r.GetActivity Dim v As View = r.RunMethod("getCurrentFocus") Upvote 0
maybe i can help, use reflector Code: Copy Dim r As Reflector r.Target = r.GetActivity Dim v As View = r.RunMethod("getCurrentFocus")