app第一阶段冲刺第二天

 

今天继续写关于个人主页的布局文件编写

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/yy_list_bkg_line_bottom"
        android:orientation="horizontal">

        <ImageView
            android:id="@+id/iv_back"
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:layout_weight="1"
            android:paddingLeft="10dp"
            android:src="@drawable/back" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_weight="10"
            android:gravity="center"
            android:text="编辑个人资料"
            android:textColor="@color/black"
            android:textSize="25sp" />

        <TextView
            android:id="@+id/tv_updateUser"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom"
            android:layout_weight="1"
            android:gravity="right"
            android:paddingBottom="5dp"
            android:paddingRight="20dp"
            android:text="完成"
            android:textSize="20sp"/>

    </LinearLayout>

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="#99D9EA"
                android:paddingLeft="20dp"
                android:text="基本资料"
                android:textSize="20sp" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/my_list_txt_background"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingLeft="20dp"
                    android:text="用户名"
                    android:textSize="25sp" />

                <EditText
                    android:id="@+id/et_displayName"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:textSize="25sp" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/my_list_txt_background"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingLeft="20dp"
                    android:text="账号"
                    android:textSize="25sp" />

                <EditText
                    android:id="@+id/et_loginId"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:textSize="25sp" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/my_list_txt_background"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingLeft="20dp"
                    android:text="性别"
                    android:textSize="25sp" />

                <EditText
                    android:id="@+id/et_sex"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:textSize="25sp" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/my_list_txt_background"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingLeft="20dp"
                    android:text="专业"
                    android:textSize="25sp" />

                <EditText
                    android:id="@+id/et_major"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:textSize="25sp" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/my_list_txt_background"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingLeft="20dp"
                    android:text="学校"
                    android:textSize="25sp" />

                <EditText
                    android:id="@+id/et_school"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:textSize="25sp" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/my_list_txt_background"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingLeft="20dp"
                    android:text="入学时间"
                    android:textSize="25sp" />

                <EditText
                    android:id="@+id/et_academicStarts"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:textSize="25sp" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/my_list_txt_background"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingLeft="20dp"
                    android:text="毕业时间"
                    android:textSize="25sp" />

                <EditText
                    android:id="@+id/et_graduationTime"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:textSize="25sp" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/my_list_txt_background"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingLeft="20dp"
                    android:text="现职业"
                    android:textSize="25sp" />

                <EditText
                    android:id="@+id/et_work"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:textSize="25sp" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/my_list_txt_background"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingLeft="20dp"
                    android:text="所在地"
                    android:textSize="25sp" />

                <EditText
                    android:id="@+id/et_location"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:textSize="25sp" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/my_list_txt_background"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingLeft="20dp"
                    android:text="简介"
                    android:textSize="25sp" />

                <EditText
                    android:id="@+id/et_introduction"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:textSize="25sp" />

            </LinearLayout>

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="#99D9EA"
                android:paddingLeft="20dp"
                android:text="个人隐私"
                android:textSize="20sp" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/my_list_txt_background"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingLeft="20dp"
                    android:text="真实姓名"
                    android:textSize="25sp" />

                <EditText
                    android:id="@+id/et_realName"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:textSize="25sp" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/my_list_txt_background"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingLeft="20dp"
                    android:text="出生日期"
                    android:textSize="25sp" />

                <EditText
                    android:id="@+id/et_birthday"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:textSize="25sp" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/my_list_txt_background"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingLeft="20dp"
                    android:text="联系方式"
                    android:textSize="25sp" />

                <EditText
                    android:id="@+id/et_contactWay"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:textSize="25sp" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/my_list_txt_background"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingLeft="20dp"
                    android:text="邮箱"
                    android:textSize="25sp" />

                <EditText
                    android:id="@+id/et_mail"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:textSize="25sp" />

            </LinearLayout>
        </LinearLayout>
    </ScrollView>

</LinearLayout>

 

这是关于个人资料信息的布局文件编写,这个layout文件的代码数虽然多,但是代码逻辑比较简单,就是得把属性写好,然后注意为每一个构件,比如为文本图片构件写id 这样在后台Java文件中就可以进行绑定事件

布局文件截图

 

 

 

 

明天写我的发布,我的粉丝,我的关注。

 

posted @ 2022-04-18 17:35  kuaiquxie  阅读(22)  评论(0编辑  收藏  举报