4.18

LinearLayout布局实操:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".ui.notifications.NotificationsFragment"
    android:orientation="vertical">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/white"
        android:orientation="vertical">

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

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="25dp"
                android:layout_marginTop="50dp"
                android:layout_marginBottom="50dp"
                android:background="#fff"
                android:orientation="horizontal">

                <ImageView
                    android:id="@+id/touxiang"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginRight="10dp"
                    android:layout_weight="5"
                    android:adjustViewBounds="true"
                    android:background="#fff"
                    android:src="@drawable/touxiang"/>

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

                    <TextView
                        android:id="@+id/xingming"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="5dp"
                        android:layout_marginTop="5dp"
                        android:text="姓名"
                        android:textSize="24dp"
                        android:textStyle="bold" />

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

                        <TextView
                            android:id="@+id/weixinhao"
                            android:layout_width="200dp"
                            android:layout_height="wrap_content"
                            android:layout_marginLeft="5dp"
                            android:layout_marginTop="5dp"
                            android:text="微信号:XXXXXXX" />

<!--                        <TextView-->
<!--                            android:id="@+id/fuhao"-->
<!--                            android:layout_width="wrap_content"-->
<!--                            android:layout_height="wrap_content"-->
<!--                            android:layout_marginLeft="50dp"-->
<!--                            android:layout_marginTop="5dp"-->
<!--                            android:layout_weight="1"-->
<!--                            android:text=">" />-->

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

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="15dp"
            android:layout_marginBottom="15dp"
            android:background="#fff"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/xinxi"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_marginTop="9dp"
                android:layout_weight="1"
                android:adjustViewBounds="true"
                android:src="@drawable/xinxi" />

            <TextView
                android:id="@+id/xiangxixinxi"
                android:layout_width="wrap_content"
                android:layout_height="50dp"
                android:layout_weight="5"
                android:gravity="center_vertical"
                android:text="详细信息"
                android:textSize="20dp" />
        </LinearLayout>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="#fff"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/zxsrztwo"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_marginTop="11dp"
                android:layout_weight="1"
                android:adjustViewBounds="true"
                android:src="@drawable/zsxrz2" />

            <TextView
                android:id="@+id/zixunshirenzheng"
                android:layout_width="wrap_content"
                android:layout_height="50dp"
                android:layout_weight="5"
                android:gravity="center_vertical"
                android:text="咨询师认证"
                android:textSize="20dp" />
        </LinearLayout>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="#fff"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/shezhi"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_marginTop="27dp"
                android:layout_weight="1"
                android:adjustViewBounds="true"
                android:src="@drawable/shezhi" />

            <TextView
                android:id="@+id/ruanjianshezhi"
                android:layout_width="wrap_content"
                android:layout_height="50dp"
                android:layout_weight="5"
                android:layout_marginTop="18dp"
                android:gravity="center_vertical"
                android:text="软件设置"
                android:textSize="20dp" />
        </LinearLayout>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="#fff"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/fk"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_marginTop="27dp"
                android:layout_weight="1"
                android:adjustViewBounds="true"
                android:src="@drawable/fk" />

            <TextView
                android:id="@+id/fankui"
                android:layout_width="wrap_content"
                android:layout_height="50dp"
                android:layout_weight="5"
                android:layout_marginTop="18dp"
                android:gravity="center_vertical"
                android:text="反馈"
                android:textSize="20dp" />
        </LinearLayout>
    </LinearLayout>
</LinearLayout>

 

posted @ 2022-04-18 23:14  _Pi  阅读(84)  评论(0)    收藏  举报