zoukankan      html  css  js  c++  java
  • 团队冲刺博客(四)

    这次将所有代码整合在一起后,需要有一个用户登录过后的进入界面,所以写了一个简单的用户登录后,点击用户头像,进入用户主页的一个界面。

    效果如下:

    代码如下:

      1 <?xml version="1.0" encoding="utf-8"?>
      2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      3     xmlns:app="http://schemas.android.com/apk/res-auto"
      4     xmlns:tools="http://schemas.android.com/tools"
      5     android:layout_width="match_parent"
      6     android:layout_height="match_parent"
      7     android:background="#ebebef"
      8     android:orientation="vertical"
      9     tools:context=".User_Page.user_click_later_page">
     10 
     11     <RelativeLayout
     12         android:layout_width="match_parent"
     13         android:layout_height="wrap_content">
     14 
     15         <ImageView
     16             android:id="@+id/user_back"
     17             android:src="@drawable/side_nav_bar"
     18             android:layout_width="match_parent"
     19             android:layout_height="200dp" />
     20 
     21         <ImageView
     22             android:id="@+id/user_head"
     23             android:layout_width="80dp"
     24             android:layout_height="80dp"
     25             android:src="@drawable/ic_exit"
     26             android:layout_centerInParent="true"/>
     27 
     28         <RelativeLayout
     29             android:layout_width="match_parent"
     30             android:layout_height="wrap_content"
     31             android:layout_alignBottom="@+id/user_back"
     32             android:layout_marginBottom="20dp">
     33 
     34             <ImageView
     35                 android:id="@+id/user_line"
     36                 android:layout_width="1dp"
     37                 android:layout_height="25dp"
     38                 android:layout_marginLeft="15dp"
     39                 android:layout_centerHorizontal="true"
     40                 android:background="#FFFFFF"/>
     41 
     42             <TextView
     43                 android:id="@+id/user_name"
     44                 android:layout_width="wrap_content"
     45                 android:layout_height="wrap_content"
     46                 android:layout_toLeftOf="@+id/user_line"
     47                 android:textSize="17sp"
     48                 android:textColor="#FFFFFF"
     49                 android:text="奶油布丁"/>
     50 
     51             <TextView
     52                 android:id="@+id/user_val"
     53                 android:layout_width="wrap_content"
     54                 android:layout_height="wrap_content"
     55                 android:layout_marginLeft="15dp"
     56                 android:textSize="17sp"
     57                 android:textColor="#FFFFFF"
     58                 android:layout_toRightOf="@+id/user_line"
     59                 android:text="123456789"/>
     60 
     61         </RelativeLayout>
     62 
     63     </RelativeLayout>
     64 
     65     <LinearLayout
     66         android:id="@+id/user_all"
     67         android:layout_width="match_parent"
     68         android:layout_height="wrap_content"
     69         android:orientation="vertical">
     70 
     71         <LinearLayout
     72             android:layout_width="match_parent"
     73             android:layout_height="60dp"
     74             android:orientation="horizontal">
     75 
     76             <ImageView
     77                 android:layout_width="wrap_content"
     78                 android:layout_height="wrap_content"
     79                 android:layout_gravity="center_vertical"
     80                 android:paddingTop="20dp"
     81                 android:src="@drawable/ic_exit"
     82                 android:layout_marginBottom="10dp"/>
     83 
     84             <TextView
     85                 android:layout_width="wrap_content"
     86                 android:layout_height="match_parent"
     87                 android:text="用户中心"
     88                 android:textSize="20dp"
     89                 android:textColor="#000000"
     90                 android:layout_weight="1"
     91                 android:layout_marginLeft="12dp"
     92                 android:gravity="center_vertical"/>
     93 
     94         </LinearLayout>
     95         <View
     96             android:layout_width="match_parent"
     97             android:layout_height="0.5dp"
     98             android:background="#090808"/>
     99 
    100         <LinearLayout
    101             android:layout_width="match_parent"
    102             android:layout_height="60dp"
    103             android:orientation="horizontal">
    104 
    105             <ImageView
    106                 android:layout_width="wrap_content"
    107                 android:layout_height="wrap_content"
    108                 android:layout_gravity="center_vertical"
    109                 android:paddingTop="20dp"
    110                 android:src="@drawable/ic_exit"
    111                 android:layout_marginBottom="10dp"/>
    112 
    113             <TextView
    114                 android:layout_width="wrap_content"
    115                 android:layout_height="match_parent"
    116                 android:text="注销"
    117                 android:textSize="20dp"
    118                 android:textColor="#000000"
    119                 android:layout_weight="1"
    120                 android:layout_marginLeft="12dp"
    121                 android:gravity="center_vertical"/>
    122 
    123         </LinearLayout>
    124         <View
    125             android:layout_width="match_parent"
    126             android:layout_height="0.5dp"
    127             android:background="#090808"/>
    128 
    129         <LinearLayout
    130             android:layout_width="match_parent"
    131             android:layout_height="60dp"
    132             android:orientation="horizontal">
    133 
    134             <ImageView
    135                 android:layout_width="wrap_content"
    136                 android:layout_height="wrap_content"
    137                 android:layout_gravity="center_vertical"
    138                 android:paddingTop="20dp"
    139                 android:src="@drawable/ic_exit"
    140                 android:layout_marginBottom="10dp"/>
    141 
    142             <TextView
    143                 android:layout_width="wrap_content"
    144                 android:layout_height="match_parent"
    145                 android:text="设置"
    146                 android:textSize="20dp"
    147                 android:textColor="#000000"
    148                 android:layout_weight="1"
    149                 android:layout_marginLeft="12dp"
    150                 android:gravity="center_vertical"/>
    151 
    152         </LinearLayout>
    153         <View
    154             android:layout_width="match_parent"
    155             android:layout_height="0.5dp"
    156             android:background="#090808"/>
    157 
    158     </LinearLayout>
    159 
    160 </LinearLayout>

    界面还有一些不太 适合团队的整体风格,所以后续还会继续改善的。

  • 相关阅读:
    原生JS实现无缝轮播
    原生JS模拟百度搜索框
    2016年终总结:一份来自跨界喜剧人的告白
    PHP学习笔记
    html5吹牛扯淡篇,闲话内容。
    html5+css3+jquery完成响应式布局
    jquery的animate({})动画整理
    函数的使用和选择
    jquery函数理解与运用
    老生长谈的$.extend()方法
  • 原文地址:https://www.cnblogs.com/miao-com/p/14779378.html
Copyright © 2011-2022 走看看