完善收入支出页面的ui设计
<?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:layout_width="match_parent" android:layout_height="match_parent" > <TextView android:id="@+id/textViewCategory" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_marginLeft="19dp" android:layout_marginTop="14dp" android:text="类别" /> <TextView android:id="@+id/textViewRemark" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/textViewCategory" android:layout_alignLeft="@+id/textViewCategory" android:layout_marginLeft="120dp" android:layout_marginTop="26dp" android:text="备注" /> <TextView android:id="@+id/textViewMoney" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/textViewCategory" android:layout_alignBottom="@+id/textViewCategory" android:layout_alignParentRight="true" android:layout_marginRight="16dp" android:text="500" android:textColor="@android:color/holo_red_light" android:textAppearance="?android:attr/textAppearanceLarge" /> <TextView android:id="@+id/textViewDate" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/textViewRemark" android:layout_alignBottom="@+id/textViewRemark" android:layout_alignRight="@+id/textViewMoney" android:textColor="@android:color/darker_gray" android:text="2017-11-28" /> <ImageView android:id="@+id/imageViewIcon" android:layout_width="36dp" android:layout_height="36dp" android:layout_below="@+id/textViewCategory" android:layout_alignStart="@+id/textViewCategory" android:layout_marginStart="0dp" android:layout_marginTop="5dp" app:srcCompat="@drawable/baby_icon" /> </RelativeLayout>
<?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:layout_width="match_parent" android:layout_height="@dimen/nav_header_height" android:background="@drawable/material_design_2" android:gravity="bottom" android:orientation="vertical" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:theme="@style/ThemeOverlay.AppCompat.Dark"> <ImageView android:id="@+id/imageView" android:layout_width="80dp" android:layout_height="80dp" android:contentDescription="@string/nav_header_desc" android:paddingTop="@dimen/nav_header_vertical_spacing" app:srcCompat="@drawable/default_user_logo" /> <TextView android:id="@+id/textViewName" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingTop="@dimen/nav_header_vertical_spacing" android:text="@string/nav_header_title" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> </LinearLayout>
<?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="8dp" android:id="@+id/cv_item" card_view:cardCornerRadius="4dp"> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" > <TextView android:id="@+id/textViewCategory" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_marginLeft="19dp" android:layout_marginTop="5dp" android:text="类别" /> <ImageView android:id="@+id/imageViewIcon" android:layout_width="36dp" android:layout_height="36dp" android:layout_below="@+id/textViewCategory" android:layout_alignStart="@+id/textViewCategory" android:layout_marginStart="0dp" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" card_view:srcCompat="@drawable/baby_icon" /> <TextView android:id="@+id/textViewMoney" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:text="500" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="@android:color/holo_red_light" /> <TextView android:id="@+id/textViewRemark" android:layout_width="wrap_content" android:layout_height="30dp" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:layout_marginTop="5dp" android:layout_marginRight="15dp" android:textColor="@android:color/darker_gray" android:text="备注" /> <TextView android:id="@+id/textViewDate" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/textViewRemark" android:layout_alignParentRight="true" android:layout_marginTop="5dp" android:layout_marginRight="15dp" android:text="2017-11-28" android:textColor="@android:color/darker_gray" /> </RelativeLayout> </android.support.v7.widget.CardView>