要求:制作如图所示的点菜界面
需要id的有:请输入姓名EditText(name);RadioGroup(gender),男RadioButton(man),女RadioButton(lady);辣CheckBox(la),海鲜CheckBox(haixian),酸CheckBox(suan);进度条SeekBar(sb),0TextView(yusuan);寻找菜品Button(xunzhao);图片ImageView(img,iv);下一个Button(next)。
把图片放入drawable
总体上:
在activity_main.xml中
开始选餐
<!-- 开始选餐-->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#00FF00"
android:gravity="center"
android:text="开始选餐"
android:textSize="30sp"></TextView>
姓名栏
EditText中使用权重
<!-- 姓名栏-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="姓名:"
android:textSize="30sp"></TextView>
<EditText
android:id="@+id/name"
android:layout_width="0sp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="请输入姓名"></EditText>
</LinearLayout>
性别栏
android:checked="true"设置默认选中“男”
<!-- 性别栏-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="性别:"
android:textSize="30sp"></TextView>
<RadioGroup
android:id="@+id/gender"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal">
<RadioButton
android:id="@+id/man"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="男"></RadioButton>
<RadioButton
android:id="@+id/lady"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="女"></RadioButton>
</RadioGroup>
</LinearLayout>
喜好栏
<!-- 喜好栏-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="喜好:"
android:textSize="30sp"></TextView>
<CheckBox
android:id="@+id/la"
android:layout_width