我是 android 开发的菜鸟,我在构建布局时遇到问题。我有一个包含文本视图的相对布局和一个包含两个复选框的线性布局。我希望 textView 出现在左侧,而线性布局出现在与边缘齐平的线性布局的右侧。目前,textview 和 linearlayout 出现在彼此的顶部。任何帮助是极大的赞赏。
<RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal" >
            <TextView
                android:id="@+id/textView2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:paddingLeft="5dp"
                android:text="Rotated Shelf:           " 
                android:layout_gravity="center_vertical"/>
            <LinearLayout
                android:id="@+id/rotated"
                android:layout_width="match_parent"
                android:layout_height="32dp"                   
                android:layout_alignParentRight="true">                  
                <CheckBox
                    android:id="@+id/rotatedshelfYES"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Yes"
                    android:layout_toLeftOf="@+id/rotatedshelfNO"
                     />
                <CheckBox
                    android:id="@+id/rotatedshelfNO"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingRight="75dp"
                    android:text="No"
                    android:layout_alignParentRight="true" />
            </LinearLayout>
        </RelativeLayout>