この問題をすばやく解決したい場合は、Split Pane Layoutを使用することをおすすめします。
用途:
<com.mobidevelop.spl.widget.SplitPaneLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:spl="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:id="@+id/splitPaneLayout"
android:layout_height="match_parent"
spl:splitterSize="12dp"
spl:orientation="vertical"
spl:splitterPosition="50%"
spl:splitterBackground="#781b23">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="" />
</ScrollView>
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text=""/>
</ScrollView>
</com.mobidevelop.spl.widget.SplitPaneLayout>
私は、肖像画や風景モード用の2つのXMLSを作成することによって、あなたの問題を解決しました。ポートレートモードでは、私はspl:orientation="vertical"
を追加してパネルの向きを垂直に設定し、lanscapeモードではパネルの向きを水平に設定してspl:orientation="horizontal"
を追加します。
これをすべて実行した後、私は以下のように見えます。
あなたは基本的にAndroid Nの分割画面を望んでいますhttp://androidxref.com/7.1.1_r6/xref/frameworks/base/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.javaスタックと関連があるすべてを捨てることができるはずです。実際に活動している活動。 – JohanShogun