<?xml version="1.0" encoding="utf-8"?> <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="@mipmap/bg02" android:orientation="vertical" tools:context=".MainActivity"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="10dp" android:background="#B9B9ff" android:text="@string/start_select_food" android:textAlignment="center" android:textColor="#8A2B12" android:textSize="30sp" android:textStyle="bold|italic" android:typeface="monospace" /> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="45dp" android:layout_marginLeft="15dp" android:gravity="center_vertical" android:orientation="horizontal"> <TextView android:layout_width="60dp" android:layout_height="wrap_content" android:text="@string/name" android:textSize="22sp" /> <EditText android:id="@+id/nameEditText" android:layout_width="200dp" android:layout_height="wrap_content" android:hint="@string/edit_text_input_hint_name" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="45dp" android:layout_marginLeft="15dp" android:gravity="center_vertical" android:orientation="horizontal"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/sex" android:textSize="22sp" /> <RadioGroup android:id="@+id/SexRadioGroup" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/maleRadioButton" android:layout_width="75dp" android:layout_height="wrap_content" android:text="@string/male" android:textSize="22sp" /> <RadioButton android:id="@+id/femaleRadioButton" android:layout_width="75dp" android:layout_height="wrap_content" android:text="@string/female" android:textSize="22sp" /> </RadioGroup> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="45dp" android:layout_marginLeft="15dp" android:gravity="center_vertical" android:orientation="horizontal"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/fond" android:textSize="22sp" /> <LinearLayout android:id="@+id/Fond" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <CheckBox android:id="@+id/hotCheckBox" android:layout_width="65dp" android:layout_height="wrap_content" android:text="@string/hot" android:textSize="22sp" /> <CheckBox android:id="@+id/fishCheckBox" android:layout_width="100dp" android:layout_height="wrap_content" android:text="@string/seafood" android:textSize="22sp" /> <CheckBox android:id="@+id/sourCheckBox" android:layout_width="65dp" android:layout_height="wrap_content" android:text="@string/sour" android:textSize="22sp" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="45dp" android:layout_marginLeft="15dp" android:gravity="center_vertical" android:orientation="horizontal"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/budget" android:textSize="22sp" /> <LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/_0yuan" android:textSize="22sp" /> <SeekBar android:id="@+id/seekBar" android:layout_width="210dp" android:layout_height="wrap_content" android:max="100" android:textSize="22sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/_100yuan" android:textSize="22sp" /> </LinearLayout> </LinearLayout> <Button android:id="@+id/searchButton" android:layout_width="300dp" android:layout_height="50dp" android:gravity="center_horizontal" android:layout_gravity="center_horizontal" android:text="@string/search_food" android:textSize="22sp" /> </LinearLayout> <!-- - - - - - - - - - 分界线 - - - - - - - - - - - - - --> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:orientation="vertical"> <ImageView android:id="@+id/foodImageView" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="3" android:src="@mipmap/lock" /> <ToggleButton android:id="@+id/showToggleButton" android:layout_width="300dp" android:layout_height="50dp" android:gravity="center_horizontal" android:layout_gravity="center_horizontal" android:textOff="@string/next_food" android:textOn="@string/details" android:textSize="22sp"/> </LinearLayout> </LinearLayout>
UI基础入门-综合案例-02
最新推荐文章于 2024-07-03 23:39:30 发布