Google TV 用のカスタム レイアウトがあり、レイアウトを機能させるために、アクティビティで dispatchkeyEvent をオーバーライドして、レイアウトが dpad で機能するようにします。私のレイアウトもグリッドビューを使用しています.dispatchKeyEventをオーバーライドするため、グリッドビューでdpadを使用できません。キーイベントをグリッドビューに渡して使用できるようにする方法はありますか?
Edit1: どうやら、.isFocusable() に従って、グリッドビューをフォーカスすることはできません。強制的にフォーカス可能にする方法はありますか?
Edit2: 問題は、すべてのコントロールからフォーカスを奪っている VideoView だと思いますか? これが私が使用しているレイアウトです。VideoView を取り出すと、コントロールを使用できます。UI とワークスペースのレイアウトは、ビデオ上の UI オーバーレイです。これを回避する方法はありますか?
<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>