fragment_history_content.xml 10.3 KB
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:appNs="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/background_main">

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/ll_stepType"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true">


        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <LinearLayout
                android:id="@+id/layout_top"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <RelativeLayout
                    android:id="@+id/layout_date_controll"
                    android:layout_width="match_parent"
                    android:layout_height="44dp"
                    android:layout_alignParentTop="true"
                    android:gravity="center_vertical">

                    <ImageButton
                        android:id="@+id/btn_left_date"
                        android:layout_width="44dp"
                        android:layout_height="44dp"
                        android:layout_alignParentLeft="true"
                        android:layout_centerVertical="true"
                        android:layout_marginLeft="16dp"
                        android:background="@android:color/darker_gray"
                        android:padding="8dp"
                        android:scaleType="fitCenter"
                        android:src="@drawable/ic_left_arrow" />

                    <TextView
                        android:id="@+id/tv_date"
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:layout_toRightOf="@+id/btn_left_date"
                        android:background="@android:color/white"
                        android:gravity="center_vertical"
                        android:padding="8dp"
                        android:text="2017年1月1日"
                        android:textColor="@android:color/black"
                        android:textSize="18sp" />

                    <TextView
                        android:id="@+id/tv_week_day"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_toLeftOf="@+id/btn_right_date"
                        android:layout_toRightOf="@+id/tv_date"
                        android:background="@android:color/white"
                        android:gravity="center"
                        android:text="日曜日"
                        android:textColor="@android:color/black"
                        android:textSize="18sp" />

                    <ImageButton
                        android:id="@+id/btn_right_date"
                        android:layout_width="44dp"
                        android:layout_height="44dp"
                        android:layout_alignParentRight="true"
                        android:layout_centerVertical="true"
                        android:layout_marginRight="16dp"
                        android:background="@android:color/darker_gray"
                        android:padding="8dp"
                        android:scaleType="fitCenter"
                        android:src="@drawable/ic_right_arrow" />
                </RelativeLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="20dp"
                    android:orientation="horizontal"
                    android:weightSum="5">

                    <Button
                        android:id="@+id/btn_oneDay"
                        style="@style/button_normal_style"
                        android:layout_width="0dp"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        android:background="@drawable/button_background"
                        android:text="@string/one_day" />

                    <Button
                        android:id="@+id/btn_oneWeek"
                        style="@style/button_normal_style"
                        android:layout_width="0dp"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        android:background="@drawable/button_background"
                        android:text="@string/one_week" />

                    <Button
                        android:id="@+id/btn_oneMonth"
                        style="@style/button_normal_style"
                        android:layout_width="0dp"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        android:background="@drawable/button_background"
                        android:text="@string/one_month" />

                    <Button
                        android:id="@+id/btn_threeMonth"
                        style="@style/button_normal_style"
                        android:layout_width="0dp"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        android:background="@drawable/button_background"
                        android:text="@string/three_month" />

                    <Button
                        android:id="@+id/btn_sixMonth"
                        style="@style/button_normal_style"
                        android:layout_width="0dp"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        android:background="@drawable/button_background"
                        android:text="@string/six_month" />

                </LinearLayout>
            </LinearLayout>

            <LinearLayout
                android:id="@+id/rcv_rank"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_above="@+id/layout_bottom"
                android:layout_below="@+id/layout_top"
                android:orientation="vertical">

                <include layout="@layout/history_page_7_content"/>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="120dp"
                    android:orientation="vertical"
                    android:layout_marginTop="10dp">

                    <!--<org.eazegraph.lib.charts.BarChart-->
                    <!--xmlns:eaze="http://schemas.android.com/apk/res-auto"-->
                    <!--android:id="@+id/bargraph"-->
                    <!--android:layout_width="match_parent"-->
                    <!--android:layout_height="120dp"-->
                    <!--android:layout_below="@+id/averageandtotaltext"-->
                    <!--eaze:egLegendHeight="0dp"-->
                    <!--eaze:egShowValues="false" />-->
                    <com.github.mikephil.charting.charts.BarChart
                        android:id="@+id/chart"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent" />


                </LinearLayout>


            </LinearLayout>

            <LinearLayout
                android:id="@+id/layout_bottom"
                android:layout_width="match_parent"
                android:layout_height="56dp"
                android:orientation="horizontal"
                android:weightSum="5">

                <Button
                    android:id="@+id/btn_face"
                    style="@style/button_bot_page_7_style"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:background="@drawable/button_background"
                    android:lines="2"
                    android:layout_margin="2dp"
                    android:text="@string/facebook" />

                <Button
                    android:id="@+id/btn_twitter"
                    style="@style/button_bot_page_7_style"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:background="@drawable/button_background"
                    android:lines="2"
                    android:layout_margin="2dp"
                    android:text="@string/twitter" />

                <Button
                    android:id="@+id/btn_line"
                    style="@style/button_bot_page_7_style"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:background="@drawable/button_background"
                    android:lines="2"
                    android:layout_margin="2dp"
                    android:text="@string/line" />

                <Button
                    android:id="@+id/btn_email"
                    style="@style/button_bot_page_7_style"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:background="@drawable/button_background"
                    android:lines="2"
                    android:layout_margin="2dp"
                    android:text="@string/mail" />

                <Button
                    android:id="@+id/btn_other"
                    style="@style/button_bot_page_7_style"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:background="@drawable/button_background"
                    android:lines="2"
                    android:layout_margin="2dp"
                    android:text="@string/other" />

            </LinearLayout>

        </LinearLayout>
    </ScrollView>

    <include layout="@layout/type_step" />
</RelativeLayout>