I have a custom layout for the google tv and to get the layout to work, I override the dispatchkeyEvent in my activity to get my layout to work with the dpad. My layout also uses the gridview, and since I override the dispatchKeyEvent, I cant use the dpad with the gridview. Is there anyway to pass the key event to the gridview so I can use it?
Edit1: Apparently, the gridview cannot be focusd according to .isFocusable(). Is there anyway to force it to become focusable?
Edit2: I think the problem is the VideoView that is taking focus from all the controls? Heres the layout I'm using. If I take out the VideoView, i am able to use the controls. The UI and Workspace layouts is my UI overlay over the video. Is there anway to get around this?
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1" >
<VideoView
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<RelativeLayout
android:id="@+id/ui"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="bottom" >
<LinearLayout
android:id="@+id/workspace"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="bottom" >
</LinearLayout>
</RelativeLayout>
</FrameLayout>