用片段分割Android布局

用片段分割Android布局,android,android-layout,android-fragments,rotation,Android,Android Layout,Android Fragments,Rotation,我想展示这个布局:两个片段,第一个逆时针旋转90度,它的布局粘在屏幕的左侧,第二个填充屏幕右侧的剩余空间 这就是我想要实现的目标: 我使用此布局显示它们浮动在另一个上: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" androi

我想展示这个布局:两个片段,第一个逆时针旋转90度,它的布局粘在屏幕的左侧,第二个填充屏幕右侧的剩余空间

这就是我想要实现的目标:

我使用此布局显示它们浮动在另一个上:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="0dp"
android:orientation="vertical"
android:padding="0dp"
tools:context=".StartActivity" >

<fragment
    android:id="@+id/first"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="0dp"
    android:background="#dddddd"
    android:padding="10dp" />

<fragment
    android:id="@+id/second"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_margin="0dp"
    android:layout_weight="1"
    android:background="#333333"
    android:padding="10dp" />

</LinearLayout>
编辑:


问题是我无法旋转片段,但仍然确保片段的布局正确,同时支持API级别11+

,这是什么问题?轮换?我认为在Android中旋转视图/布局/片段不是很容易。@Simon AndréForsberg我编辑了这个问题。