I am very new to the Google TV app development. I have opted my mobile app layout to Google Tv and it's working fine. In mobile app, we add setOnItemClickListener() on listview to perform actions, but the Google Tv is non touchable device, the operations are performed by remote so instead of setOnItemClickListener() is there any listener to track d pad hovering so that I can change the view. Thanks in advance
Asked
Active
Viewed 392 times
1 Answers
0
I believe you can set focus to the list view - mListView.requestFocus(); and dpad will navigate thru the list view and if you press enter or ok button (depending on remote device) if should select item in the list view.
Not sure what your overall layout looks like but you can also add focus to items to navigate out you list view in your xml layout using:
<ListView
android:nextFocusUp="@+id/id_of_view"
android:nextFocusDown="@+id/id_of_view"
android:nextFocusLeft="@+id/id_of_view"
android:nextFocusRight="@+id/id_of_view"/>

HaitoH3
- 1
- 1