add: new ui for drawer

This commit is contained in:
hyb1996
2017-08-25 13:10:52 +08:00
parent 16d48bd6b5
commit 5d6e66d5d5
27 changed files with 419 additions and 328 deletions

View File

@@ -0,0 +1,137 @@
<?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="304dp"
android:layout_height="match_parent"
android:background="@android:color/white"
android:clickable="true"
android:fitsSystemWindows="false"
android:importantForAccessibility="no"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="170dp"
android:layout_marginBottom="5dp"
android:background="#5cab7d">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/avatar"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_above="@+id/username"
android:layout_marginBottom="16dp"
android:layout_marginLeft="8dp"
android:scaleType="fitXY"
android:src="@drawable/profile_avatar_placeholder"
app:riv_border_color="#77f2f3f5"
app:riv_border_width="0.5dp"
app:riv_corner_radius="40dp"/>
<TextView
android:id="@+id/username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginBottom="16dp"
android:layout_marginLeft="12dp"
android:gravity="center"
android:text="@string/not_login"
android:textColor="@android:color/white"
android:textSize="14sp"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="118dp"
android:layout_marginLeft="-12dp"
android:layout_toRightOf="@+id/avatar"
android:layout_alignParentBottom="true"
android:src="@drawable/android_eating_half"
android:alpha="0.08"
android:tint="#000000"/>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include
layout="@layout/drawer_menu"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#f2f3f5"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_gravity="bottom"
android:baselineAligned="false">
<LinearLayout
android:id="@+id/setting"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?selectableItemBackground"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:layout_marginRight="12dp"
android:src="@drawable/ic_ali_settings"
android:tint="#666666"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="center"
android:text="@string/text_setting"
android:textSize="15sp"/>
</LinearLayout>
<LinearLayout
android:id="@+id/exit"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?selectableItemBackground"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:layout_marginRight="12dp"
android:src="@drawable/ic_ali_exit"
android:tint="#666666"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="center"
android:text="@string/text_exit"
android:textSize="15sp"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>