云相册ui设计:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="60dp" android:layout_gravity="bottom"> <RadioGroup android:id="@+id/home_tb" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentBottom="true" android:background="@color/colorTab" android:orientation="horizontal"> <RadioButton android:id="@+id/photo_album" style="@style/Custom.TabRadioButton" android:layout_width="100dp" android:checked="true" android:text="相册" /> <ImageView android:id="@+id/take_a_picture" style="@style/Custom.TabRadioButton" android:background="@drawable/background_camera" android:src="@drawable/ic_menu_camera" /> <RadioButton android:id="@+id/photo_editing" style="@style/Custom.TabRadioButton" android:layout_width="100dp" android:text="剪辑" /> </RadioGroup> </LinearLayout>
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/nav_header_main" android:layout_width="match_parent" android:layout_height="@dimen/nav_header_height" android:background="@drawable/side_nav_bar" android:gravity="bottom" android:orientation="vertical" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingBottom="@dimen/activity_vertical_margin" android:theme="@style/ThemeOverlay.AppCompat.Dark"> <!-- 头像 --> <ImageView android:id="@+id/Head_portrait" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="20dp" android:layout_marginBottom="27dp" android:contentDescription="@string/nav_header_desc" android:paddingTop="@dimen/nav_header_vertical_spacing" app:srcCompat="@mipmap/ic_cream_round" /> <!-- 用户名 --> <TextView android:id="@+id/User_Name" android:layout_width="match_parent" android:layout_height="60dp" android:layout_toRightOf="@+id/Head_portrait" android:layout_marginLeft="25dp" android:layout_marginTop="35dp" android:textSize="20dp" android:text="用户名:"/> </RelativeLayout>