1:安装环境,截图编程界面,截图运行界面
2:九宫格
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="300dp" android:layout_height="300dp" android:background="#BE041058" android:layout_margin="50dp" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:background="#EEECEC" android:layout_weight="1" android:orientation="horizontal"> <View android:id="@+id/v_1" android:layout_width="0dp" android:layout_height="match_parent" android:background="#A36BCCC1" android:layout_weight="1"/> <View android:id="@+id/v_2" android:layout_width="0dp" android:layout_height="match_parent" android:background="#CE5980A2" android:layout_weight="1"/> <View android:id="@+id/v_3" android:layout_width="0dp" android:layout_height="match_parent" android:background="#BE6D61AF" android:layout_weight="1"/> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:background="#C2B363" android:layout_weight="1"> <View android:id="@+id/v_4" android:layout_width="0dp" android:layout_height="match_parent" android:background="#EE6BC79D" android:layout_weight="1"/> <View android:id="@+id/v_5" android:layout_width="0dp" android:layout_height="match_parent" android:background="#D3669DEE" android:layout_weight="1"/> <View android:id="@+id/v_6" android:layout_width="0dp" android:layout_height="match_parent" android:background="#BFAFE252" android:layout_weight="1"/> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:background="#065BEE" android:layout_weight="1"> <View android:id="@+id/v_7" android:layout_width="0dp" android:layout_height="match_parent" android:background="#E2EBB192" android:layout_weight="1"/> <View android:id="@+id/v_8" android:layout_width="0dp" android:layout_height="match_parent" android:background="#E9D38BA8" android:layout_weight="1"/> <View android:id="@+id/v_9" android:layout_width="0dp" android:layout_height="match_parent" android:background="#D2E9CE6D" android:layout_weight="1"/> </LinearLayout> </LinearLayout>
3:布局界面
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="10dp" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_weight="1" android:background="#E1A38FDB" android:layout_height="0dp" /> <LinearLayout android:layout_width="match_parent" android:layout_weight="4" android:background="#090404" android:orientation="horizontal" android:layout_height="0dp"> <View android:layout_weight="1" android:layout_height="match_parent" android:background="#F877CEDA" android:layout_width="0dp" /> <View android:layout_weight="3" android:layout_height="match_parent" android:background="#F78579F1" android:layout_width="0dp"/> <View android:layout_weight="1" android:layout_height="match_parent" android:background="#F515C6E6" android:layout_width="0dp"/> </LinearLayout>> <LinearLayout android:layout_width="match_parent" android:layout_weight="1" android:background="#F5AA79DB" android:layout_height="0dp" /> </LinearLayout>
3:制作登录界面
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_height="match_parent" android:layout_width="match_parent"> <ImageView android:id="@+id/v_0" android:layout_width="100dp" android:layout_height="100dp" android:background="@drawable/xmxm" android:layout_centerHorizontal="true" android:layout_marginTop="150dp" /> <EditText android:id="@+id/v_1" android:layout_width="match_parent" android:layout_height="50dp" android:hint="输入用户名" android:layout_marginTop="20dp" android:layout_marginHorizontal="10dp" android:padding="10dp" android:drawablePadding="10dp" android:layout_below="@id/v_0"/> <EditText android:id="@+id/v_3" android:layout_width="match_parent" android:layout_height="60dp" android:layout_marginLeft="10dp" android:hint="输入密码" android:padding="10dp" android:textColor="#ED9B57D6" android:textSize="18sp" android:layout_below="@id/v_1" android:layout_margin="15dp" android:drawablePadding="10dp" tools:ignore="UnknownId"></EditText> <Button android:id="@+id/btn_1" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#D38D6DE6" android:textColor="#E7E731" android:layout_below="@id/v_3" android:layout_margin="88dp" android:text="登录"></Button> </RelativeLayout>