これは Google TV 用です...
私はレイアウトxmlマルチスクリーンのものを経験してきましたが、これが私が思いついたものです:
私のレイアウトファイルで:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000"
android:padding="0px"
android:layout_marginTop="0px"
android:layout_marginBottom="0px"
android:layout_marginLeft="0px"
android:layout_marginRight="0px"
android:layout_weight="1"
android:overScrollMode="never"
>
<SurfaceView android:id="@+id/surface"
android:layout_width="1920dp"
android:layout_height="1080dp"
>
</SurfaceView>
<WebView
android:layout_width="1920dp"
android:layout_height="1080dp"
android:id="@+id/webView" />
<TextView
android:id="@+id/tv1"
android:text=" "
android:layout_width="4dp"
android:layout_height="4dp"/>
</RelativeLayout>
これを私のマニフェストに入れてください:
<supports-screens android:xlargeScreens="true" />
私のJavaメインに「特別なソース」を追加しました。
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
そして、「許可された」表示領域の端までうまく表示できます。しかし、画面スペースの端では、YouTube よりも約 10% 少なく制限されています。ドキュメントには、「私は許可されていません」と書かれていますが、その領域を使用しているのは明らかですが、YouTube と Netflix は使用しています。彼らはどのようにこれを行うのですか?