Files
NutritionMaster/app/src/main/res/layout/activity_main.xml
ScorpioMiku 83406a8e0b 1
2018-10-02 15:41:12 +08:00

567 lines
26 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<com.mxn.soul.flowingdrawer_core.FlowingDrawer xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawerlayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false"
android:clipToPadding="false"
app:edMenuBackground="#FFF"
app:edMenuSize="230dp"
app:edPosition="1">
<RelativeLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:id="@+id/title_layout"
android:layout_width="match_parent"
android:layout_height="110dp">
<android.support.v7.widget.Toolbar
android:id="@+id/tool_bar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:scaleType="fitXY"
app:contentInsetStart="0dp"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/AppTheme">
<LinearLayout
android:id="@+id/navigation_layout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_drawer_home" />
<com.github.siyamed.shapeimageview.CircularImageView
android:id="@+id/toolbar_user_avatar"
android:layout_width="34dp"
android:layout_height="31dp"
android:layout_marginEnd="3dp"
android:layout_marginStart="15dp"
android:src="@drawable/test_avatar" />
<TextView
android:id="@+id/tool_bar_nickname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:maxLines="1"
android:text="营养大师"
android:textColor="#FFFF"
android:textSize="15sp" />
</LinearLayout>
</android.support.v7.widget.Toolbar>
<com.flyco.tablayout.SlidingTabLayout
android:id="@+id/sliding_tab_layout"
android:layout_width="match_parent"
android:layout_height="48dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
app:tl_indicator_corner_radius="1dp"
app:tl_indicator_height="2dp"
app:tl_indicator_width="40dp"
app:tl_tab_space_equal="true">
</com.flyco.tablayout.SlidingTabLayout>
</android.support.design.widget.AppBarLayout>
<com.example.ninefourone.nutritionmaster.ui.NoScrollViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>
<com.miguelcatalan.materialsearchview.MaterialSearchView
android:id="@+id/search_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<com.nightonke.boommenu.BoomMenuButton
android:id="@+id/boom_menu_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
app:bmb_buttonEnum="ham"
app:bmb_buttonPlaceEnum="buttonPlace_ham_2"
app:bmb_piecePlaceEnum="piecePlace_ham_2" />
</RelativeLayout>
<!--menu-->
<com.mxn.soul.flowingdrawer_core.FlowingMenuLayout
android:id="@+id/menulayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="150dp"
android:background="@color/colorPrimary"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/information_layout"
android:layout_width="110dp"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<com.github.siyamed.shapeimageview.CircularImageView
android:id="@+id/drawer_user_avatar"
android:layout_width="60dp"
android:layout_height="60dp"
android:src="@drawable/test_avatar" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/user_nick_name"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:gravity="center"
android:text="ScorpioMiku"
android:textColor="#FFF" />
<TextView
android:id="@+id/user_occupation_text"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:gravity="center"
android:text="请完善信息"
android:textColor="#FFF"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_alignParentEnd="true"
android:layout_alignTop="@+id/add_information_button"
android:alpha="0.2"
android:src="@drawable/icon_black" />
<ImageView
android:id="@+id/add_information_button"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentRight="true"
android:layout_marginRight="25dp"
android:layout_marginTop="15dp"
android:src="@drawable/ic_data_add" />
</RelativeLayout>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="5dp" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/add_infor_ll"
android:layout_width="match_parent"
android:layout_height="200dp"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/adder_infor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="点击我填写信息"
android:textSize="20sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/show_information"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="36dp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="65dp"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@drawable/ic_score" />
<TextView
android:layout_width="wrap_content"
android:layout_height="10dp"
android:text="体质"
android:textColor="@color/colorPrimary"
android:textSize="8sp" />
</LinearLayout>
<com.cb.ratingbar.CBRatingBar
android:id="@+id/score_bar"
android:layout_width="150dp"
android:layout_height="36dp"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:layout_marginTop="3dp"
app:starCanTouch="true"
app:starCount="5"
app:starCoverDir="left_to_right"
app:starEndColor="#2a00ff"
app:starFillColor="#c6c6c6"
app:starMaxProgress="120"
app:starPathData="@string/pig"
app:starProgress="60"
app:starShowStroke="false"
app:starSize="20dp"
app:starSpace="10dp"
app:starStartColor="#30e2f5"
app:starStrokeWidth="1dp"
app:starUseGradient="true" />
</RelativeLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="10dp" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false">
<com.github.mikephil.charting.charts.RadarChart
android:id="@+id/spider_view"
android:layout_width="170dp"
android:layout_height="170dp"
android:layout_gravity="center">
</com.github.mikephil.charting.charts.RadarChart>
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="10dp" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<LinearLayout
android:layout_width="65dp"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="4"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@drawable/ic_bmi" />
<TextView
android:layout_width="wrap_content"
android:layout_height="10dp"
android:text="BMI值"
android:textColor="@color/colorPrimary"
android:textSize="8sp" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="8dp"
android:layout_height="8dp"
android:background="@color/color_bar_self" />
<TextView
android:layout_width="wrap_content"
android:layout_height="8dp"
android:text="@string/self_information"
android:textSize="5sp" />
<TextView
android:layout_width="8dp"
android:layout_height="8dp"
android:background="@color/color_bar_deeper" />
<TextView
android:layout_width="wrap_content"
android:layout_height="8dp"
android:text="@string/standrad_information"
android:textSize="5sp" />
</LinearLayout>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.5" />
</LinearLayout>
<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
android:id="@+id/bmi_bar"
android:layout_width="145dp"
android:layout_height="36dp"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:layout_marginTop="3dp"
app:rcBackgroundColor="@color/color_bar_background"
app:rcBackgroundPadding="5dp"
app:rcProgressColor="@color/color_bar_self"
app:rcRadius="10dp"
app:rcReverse="false"
app:rcSecondaryProgressColor="@color/color_bar_deeper" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<LinearLayout
android:layout_width="65dp"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="4"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@drawable/ic_height" />
<TextView
android:layout_width="wrap_content"
android:layout_height="10dp"
android:text="身高"
android:textColor="@color/colorPrimary"
android:textSize="8sp" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="8dp"
android:layout_height="8dp"
android:background="@color/color_bar_self" />
<TextView
android:layout_width="wrap_content"
android:layout_height="8dp"
android:text="@string/self_information"
android:textSize="5sp" />
<TextView
android:layout_width="8dp"
android:layout_height="8dp"
android:background="@color/color_bar_deeper" />
<TextView
android:layout_width="wrap_content"
android:layout_height="8dp"
android:text="@string/average_information"
android:textSize="5sp" />
</LinearLayout>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.5" />
</LinearLayout>
<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
android:id="@+id/height_bar"
android:layout_width="145dp"
android:layout_height="36dp"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:layout_marginTop="3dp"
app:rcBackgroundColor="@color/color_bar_background"
app:rcBackgroundPadding="5dp"
app:rcProgressColor="@color/color_bar_self"
app:rcRadius="10dp"
app:rcReverse="false"
app:rcSecondaryProgressColor="@color/color_bar_deeper" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<LinearLayout
android:layout_width="65dp"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="4"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@drawable/ic_weight" />
<TextView
android:layout_width="wrap_content"
android:layout_height="10dp"
android:text="体重"
android:textColor="@color/colorPrimary"
android:textSize="8sp" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="8dp"
android:layout_height="8dp"
android:background="@color/color_bar_self" />
<TextView
android:layout_width="wrap_content"
android:layout_height="8dp"
android:text="@string/self_information"
android:textSize="5sp" />
<TextView
android:layout_width="8dp"
android:layout_height="8dp"
android:background="@color/color_bar_deeper" />
<TextView
android:layout_width="wrap_content"
android:layout_height="8dp"
android:text="@string/average_information"
android:textSize="5sp" />
</LinearLayout>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.5" />
</LinearLayout>
<com.akexorcist.roundcornerprogressbar.RoundCornerProgressBar
android:id="@+id/weight_bar"
android:layout_width="145dp"
android:layout_height="36dp"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:layout_marginTop="3dp"
app:rcBackgroundColor="@color/color_bar_background"
app:rcBackgroundPadding="5dp"
app:rcProgressColor="@color/color_bar_self"
app:rcRadius="10dp"
app:rcReverse="false"
app:rcSecondaryProgressColor="@color/color_bar_deeper" />
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
</ScrollView>
</LinearLayout>
</com.mxn.soul.flowingdrawer_core.FlowingMenuLayout>
</com.mxn.soul.flowingdrawer_core.FlowingDrawer>