Android第一次作业
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="300dp"
android:layout_height="300dp"
android:orientation="vertical"
android:background="#FF7700"
android:layout_marginLeft="55dp"
android:layout_marginTop="200dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="100dp">
<View
android:layout_width="100dp"
android:layout_height="100dp"
android:background="#B7E27C"/>
<View
android:layout_width="100dp"
android:layout_height="100dp"
android:background="#7CE2B2"/>
<View
android:layout_width="100dp"
android:layout_height="100dp"
android:background="#C237AD"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="100dp">
<View
android:layout_width="100dp"
android:layout_height="100dp"
android:background="#39631F"/>
<View
android:layout_width="100dp"
android:layout_height="100dp"
android:background="#2E5E83"/>
<View
android:layout_width="100dp"
android:layout_height="100dp"
android:background="#B7E27C"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="100dp">
<View
android:layout_width="100dp"
android:layout_height="100dp"
android:background="#F076DC"/>
<View
android:layout_width="100dp"
android:layout_height="100dp"
android:background="#61D5D1"/>
<View
android:layout_width="100dp"
android:layout_height="100dp"
android:background="#FFEB3B"/>
</LinearLayout>
</LinearLayout>


作业三:布局界面
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/v1"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/v2"
android:layout_width="match_parent"
android:layout_height="100dp"
android:background="#603B9B7F"/>
<RelativeLayout
android:id="@+id/v3"
android:layout_width="match_parent"
android:layout_height="100dp"
android:background="#603B9B7F"
android:layout_marginTop="630dp"/>
<RelativeLayout
android:id="@+id/v4"
android:layout_width="100dp"
android:layout_height="530dp"
android:background="#E91E63"
android:layout_below="@id/v2"/>
<RelativeLayout
android:id="@+id/v5"
android:layout_width="100dp"
android:layout_height="530dp"
android:background="#E91E63"
android:layout_below="@id/v2"
android:layout_marginLeft="310dp"/>
</RelativeLayout>

作业四:制作登录界面
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/v1"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageButton
android:id="@+id/v2"
android:layout_width="400px"
android:layout_height="400px"
android:src="@drawable/tp"
android:layout_above="@id/v_3"
android:layout_centerHorizontal="true"/>
<EditText
android:id="@+id/v_3"
android:layout_width="match_parent"
android:layout_height="60dp"
android:hint="用户名"
android:background="@drawable/tv_1"
android:layout_marginLeft="10dp"
android:textColor="#000000"
android:textSize="20sp"
android:padding="15dp"
android:layout_margin="15dp"
android:drawablePadding="10dp"
android:layout_centerInParent="true"
android:drawableLeft="@drawable/user"/>
<EditText
android:id="@+id/v_4"
android:layout_width="match_parent"
android:layout_height="60dp"
android:hint="密码"
android:background="@drawable/tv_1"
android:layout_marginLeft="10dp"
android:textColor="#000000"
android:textSize="20sp"
android:padding="10dp"
android:layout_margin="15dp"
android:drawablePadding="10dp"
android:layout_centerInParent="true"
android:drawableLeft="@drawable/pwd"
android:layout_below="@id/v_3"/>
<Button
android:id="@+id/btn_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/btn_2"
android:textColor="#181F1F"
android:textSize="20sp"
android:layout_below="@id/v_4"
android:layout_margin="15dp"
android:text="登录"/>
</RelativeLayout>


浙公网安备 33010602011771号