zoukankan      html  css  js  c++  java
  • day 17

    我的布局设计

    布局代码

    <?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"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    
    
    
        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="150dp"
            android:background="?attr/colorPrimary" >
    
            <de.hdodenhof.circleimageview.CircleImageView
                android:id="@+id/img_head"
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="12dp"
                app:civ_border_width="2dp"
                app:civ_border_color="#FFFFFF"
                android:src="@drawable/icon_head">
    
    
            </de.hdodenhof.circleimageview.CircleImageView>
    
            <TextView
                android:id="@+id/txt_username"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginTop="60dp"
                android:layout_marginBottom="9dp"
                android:gravity="center"
                android:text="@string/to_login"
                android:textColor="@color/white"
                android:textSize="16sp" />
    
        </FrameLayout>
    
        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
    
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginTop="20dp"
                android:orientation="vertical">
    
    
    
    
                <TextView
                    android:id="@+id/txt_my_orders"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="@dimen/largePadding"
                    android:background="@drawable/selector_list_item"
                    android:drawableLeft="@drawable/icon_ding"
                    android:gravity="center_vertical"
                    android:drawablePadding="20dp"
                    android:text="@string/my_orders"
                    android:textSize="18dp"
                    android:textColor="@color/black"/>
    
                <View style="@style/line_vertical"/>
    
                <TextView
                    android:id="@+id/txt_my_car"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="@dimen/largePadding"
                    android:background="@drawable/selector_list_item"
                    android:drawableLeft="@drawable/icon_gou"
                    android:gravity="center_vertical"
                    android:drawablePadding="20dp"
                    android:textSize="18dp"
                    android:text="@string/my_favorite"
                    android:textColor="@color/black"/>
    
                <View style="@style/line_vertical"/>
    
    
                <TextView
                    android:id="@+id/txt_my_address"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="@dimen/largePadding"
                    android:background="@drawable/selector_list_item"
                    android:drawableLeft="@drawable/icon_loaction"
                    android:gravity="center_vertical"
                    android:drawablePadding="20dp"
                    android:textSize="18dp"
                    android:text="@string/my_addresses"
                    android:textColor="@color/black"/>
    
                <View style="@style/line_vertical"/>
    
                <TextView
                    android:id="@+id/txt_my_msg"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="@dimen/largePadding"
                    android:background="@drawable/selector_list_item"
                    android:drawableLeft="@drawable/icon_msg"
                    android:gravity="center_vertical"
                    android:drawablePadding="20dp"
                    android:text="@string/my_msg"
                    android:textSize="18dp"
                    android:textColor="@color/black"/>
    
    
    
                <Button
                    android:id="@+id/btn_logout"
                    android:text="@string/logout"
                    style="@style/bigRedButton"
                    android:layout_marginLeft="15dp"
                    android:layout_marginRight="15dp"
                    android:layout_marginTop="20dp"
                    android:layout_marginBottom="20dp"
                    />
    
    
    
            </LinearLayout>
    
        </ScrollView>
    
    
    
    </LinearLayout>

  • 相关阅读:
    《朗读手册》【美】吉姆·崔利斯
    《web全栈工程师的自我修养》 读书笔记
    2016/06 书单
    PostgreSQL数据库的安装
    MySQL数据库的安装
    异构数据库迁移——DATAX
    初探12C碰到的那些“坑”
    关于Ubuntu 16.04 pip安装Docker-Compose
    启动与关闭容器
    容器标识符
  • 原文地址:https://www.cnblogs.com/chenaiiu/p/13538189.html
Copyright © 2011-2022 走看看