回避策:このライブラリを使用してくださいhttps://github.com/rongi/rotate-layout
build.gradle
dependencies {
compile 'rongi.rotate-layout:rotate-layout:2.0.0'
}
your_daydream_layout.xml
<com.github.rongi.rotate_layout.layout.RotateLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:angle="-90">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<WebView
android:id="@+id/daydream_webview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#2a2e31" />
<TextView
android:id="@+id/dream_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-light"
android:text="..."
android:textColor="#abc"
android:textSize="20sp" />
</RelativeLayout>
</com.github.rongi.rotate_layout.layout.RotateLayout>
そしてところで:
あなたの空想を自動回転させることを許可してください..https://code.google.com/p/android/issues/detail ?id = 40226
「これに対する修正が実装されたようです(そして誰も教えてくれませんでした)。残念ながら、正しく機能しません。Nexus6p(6.0.1、ビルド#MHC19Q)で、左端の画面にスワイプすると(Google Now?)、左上のハンバーガーメニューを押し、[設定]を選択して、下部に移動すると、ホーム画面オプションの[回転を許可]が表示されます。これを有効にすると、ホーム画面を次のように回転できるようになります。必要に応じて横向き。Daydreamはその回転を継承し、横向きモードでも表示できます。」-2016年5月18日