1、布局设计_Mainactivity
使用线性布局之间的嵌套
<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:background="@drawable/bj"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal" >
<RadioGroup
android:id="@+id/check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<RadioButton
android:id="@+id/scissor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/scissor" />
<RadioButton
android:id="@+id/stone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/stone" />
<RadioButton
android:id="@+id/cloth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cloth" />
</RadioGroup>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal" >
<Button
android:id="@+id/Game"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/chuanquan" />
</LinearLayout>
</LinearLayout>