Newer
Older
MonCalc / app / src / main / res / layout / fragment_history.xml
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <data>

        <variable
            name="historyViewModel"
            type="jackall.moncalc.viewmodel.HistoryViewModel" />
    </data>

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#ffffff">

        <android.support.constraint.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <ImageView
                android:id="@+id/history_icon_share"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="16dp"
                android:layout_marginTop="8dp"
                android:src="@drawable/icon_share"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <android.support.constraint.ConstraintLayout
                android:id="@+id/history_card_view"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/history_icon_share">

                <android.support.v7.widget.CardView
                    android:id="@+id/today_card_view"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="8dp"
                    android:layout_marginStart="8dp"
                    android:layout_marginTop="8dp"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="@id/history_card_view">

                    <android.support.constraint.ConstraintLayout
                        android:layout_width="match_parent"
                        android:layout_height="match_parent">

                        <TextView
                            android:id="@+id/history_last_24"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="8dp"
                            android:layout_marginTop="8dp"
                            android:text="過去24時間"
                            android:textColor="@color/main_background"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />


                        <LinearLayout
                            android:id="@+id/history_last_24_top"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toBottomOf="@id/history_last_24">

                            <LinearLayout
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_weight="1"
                                android:gravity="center_horizontal"
                                android:orientation="vertical">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@{historyViewModel.todayTempleCount}"
                                    android:textColor="@color/main_background"
                                    android:textSize="@dimen/hisotry_card_value_size" />

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="神殿の周回数"
                                    android:textSize="@dimen/history_card_title_size" />


                            </LinearLayout>

                            <LinearLayout
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_weight="1"
                                android:gravity="center_horizontal"
                                android:orientation="vertical">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@{historyViewModel.todayExtraCount}"
                                    android:textColor="@color/main_background"
                                    android:textSize="@dimen/hisotry_card_value_size" />

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="エクストラ出現"
                                    android:textSize="@dimen/history_card_title_size" />

                            </LinearLayout>

                            <LinearLayout
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_weight="1"
                                android:gravity="center_horizontal"
                                android:orientation="vertical">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@{historyViewModel.todayWakurinCount}"
                                    android:textColor="@color/main_background"
                                    android:textSize="@dimen/hisotry_card_value_size" />

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="わくりん出現"
                                    android:textSize="@dimen/history_card_title_size" />

                            </LinearLayout>

                        </LinearLayout>

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginBottom="8dp"
                            android:layout_marginTop="8dp"
                            android:orientation="horizontal"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toBottomOf="@+id/history_last_24_top">

                            <LinearLayout
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_weight="1"
                                android:gravity="center_horizontal"
                                android:orientation="vertical">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@{historyViewModel.todayDrop}"
                                    android:textColor="@color/main_background"
                                    android:textSize="@dimen/hisotry_card_value_size" />

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:gravity="center"
                                    android:text="実のドロップ数"
                                    android:textSize="@dimen/history_card_title_size" />


                            </LinearLayout>

                            <LinearLayout
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_weight="1"
                                android:gravity="center_horizontal"
                                android:orientation="vertical">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@{historyViewModel.todaySpecialDrop}"
                                    android:textColor="@color/main_background"
                                    android:textSize="@dimen/hisotry_card_value_size" />

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:gravity="center"
                                    android:text="特級のドロップ数"
                                    android:textSize="@dimen/history_card_title_size" />


                            </LinearLayout>

                            <LinearLayout
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_weight="1"
                                android:gravity="center_horizontal"
                                android:orientation="vertical">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@{historyViewModel.todaySpecialPercent}"
                                    android:textColor="@color/main_background"
                                    android:textSize="@dimen/hisotry_card_value_size" />

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="特級のドロップ率"
                                    android:textSize="@dimen/history_card_title_size" />


                            </LinearLayout>
                        </LinearLayout>

                    </android.support.constraint.ConstraintLayout>
                </android.support.v7.widget.CardView>

                <android.support.v7.widget.CardView
                    android:id="@+id/week_card_view"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="8dp"
                    android:layout_marginEnd="8dp"
                    android:layout_marginStart="8dp"
                    android:layout_marginTop="8dp"
                    app:layout_constraintBottom_toBottomOf="@id/history_card_view"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/today_card_view">

                    <android.support.constraint.ConstraintLayout
                        android:layout_width="match_parent"
                        android:layout_height="match_parent">

                        <TextView
                            android:id="@+id/history_last_week"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="8dp"
                            android:layout_marginTop="8dp"
                            android:text="過去1週間"
                            android:textColor="@color/main_background"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                        <LinearLayout
                            android:id="@+id/history_last_week_top"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toBottomOf="@id/history_last_week">

                            <LinearLayout
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_weight="1"
                                android:gravity="center_horizontal"
                                android:orientation="vertical">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@{historyViewModel.weekTempleCount}"
                                    android:textColor="@color/main_background"
                                    android:textSize="@dimen/hisotry_card_value_size" />

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="神殿の周回数"
                                    android:textSize="@dimen/history_card_title_size" />


                            </LinearLayout>

                            <LinearLayout
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_weight="1"
                                android:gravity="center_horizontal"
                                android:orientation="vertical">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@{historyViewModel.weekExtraCount}"
                                    android:textColor="@color/main_background"
                                    android:textSize="@dimen/hisotry_card_value_size" />

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="エクストラ出現"
                                    android:textSize="@dimen/history_card_title_size" />

                            </LinearLayout>

                            <LinearLayout
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_weight="1"
                                android:gravity="center_horizontal"
                                android:orientation="vertical">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@{historyViewModel.weekWakurinCount}"
                                    android:textColor="@color/main_background"
                                    android:textSize="@dimen/hisotry_card_value_size" />

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="わくりん出現"
                                    android:textSize="@dimen/history_card_title_size" />

                            </LinearLayout>

                        </LinearLayout>

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginBottom="8dp"
                            android:layout_marginTop="8dp"
                            android:orientation="horizontal"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toBottomOf="@+id/history_last_week_top">

                            <LinearLayout
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_weight="1"
                                android:gravity="center_horizontal"
                                android:orientation="vertical">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@{historyViewModel.weekDrop}"
                                    android:textColor="@color/main_background"
                                    android:textSize="@dimen/hisotry_card_value_size" />

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:gravity="center"
                                    android:text="実のドロップ数"
                                    android:textSize="@dimen/history_card_title_size" />


                            </LinearLayout>

                            <LinearLayout
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_weight="1"
                                android:gravity="center_horizontal"
                                android:orientation="vertical">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@{historyViewModel.weekSpecialDrop}"
                                    android:textColor="@color/main_background"
                                    android:textSize="@dimen/hisotry_card_value_size" />

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:gravity="center"
                                    android:text="特級のドロップ数"
                                    android:textSize="@dimen/history_card_title_size" />


                            </LinearLayout>

                            <LinearLayout
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_weight="1"
                                android:gravity="center_horizontal"
                                android:orientation="vertical">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@{historyViewModel.weekSpecialPercent}"
                                    android:textColor="@color/main_background"
                                    android:textSize="@dimen/hisotry_card_value_size" />

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="特級のドロップ率"
                                    android:textSize="@dimen/history_card_title_size" />


                            </LinearLayout>
                        </LinearLayout>

                    </android.support.constraint.ConstraintLayout>
                </android.support.v7.widget.CardView>

            </android.support.constraint.ConstraintLayout>

            <!--<com.github.mikephil.charting.charts.LineChart-->
            <!--android:layout_width="match_parent"-->
            <!--android:layout_height="400dp"-->
            <!--android:layout_marginTop="8dp"-->
            <!--android:lineChart="@{historyViewModel.lineData}"-->
            <!--android:lineLabels="@{historyViewModel.labels}"-->
            <!--app:layout_constraintEnd_toEndOf="parent"-->
            <!--app:layout_constraintStart_toStartOf="parent"-->
            <!--app:layout_constraintTop_toBottomOf="@+id/week_card_view" />-->

            <!--<android.support.v4.widget.SwipeRefreshLayout-->
            <!--android:layout_width="match_parent"-->
            <!--android:layout_height="match_parent"-->
            <!--app:onRefreshListener="@{() -> historyViewModel.onRefresh()}"-->
            <!--app:refreshing="@{historyViewModel.refreshLayoutLoading}">-->

            <!--<android.support.v7.widget.RecyclerView-->
            <!--android:id="@+id/history_recycler_view"-->
            <!--android:layout_width="match_parent"-->
            <!--android:layout_height="match_parent" />-->
            <!--</android.support.v4.widget.SwipeRefreshLayout>-->

            <FrameLayout
                android:id="@+id/history_rectangle_banner_layout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/history_card_view" />

        </android.support.constraint.ConstraintLayout>
    </ScrollView>
</layout>