Newer
Older
MonCalc / app / src / main / res / layout / fragment_history.xml
KeijuMatsumoto on 5 Nov 2017 15 KB [fix] NaN
<?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">

            <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="parent">

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

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="8dp"
                        android:layout_marginTop="8dp"
                        android:text="過去24時間"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <TextView
                        android:id="@+id/today_count_temple_title"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginEnd="8dp"
                        android:layout_marginStart="8dp"
                        android:text="神殿の周回数"
                        android:textSize="@dimen/history_card_title_size"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toBottomOf="@id/today_count_temple_value" />

                    <TextView
                        android:id="@+id/today_count_temple_value"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="24dp"
                        android:text="@{historyViewModel.todayTempleCount}"
                        android:textColor="#000000"
                        android:textSize="@dimen/hisotry_card_value_size"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <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/today_count_temple_title">

                        <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="#000000"
                                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="#000000"
                                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="#000000"
                                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="parent"
                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:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="8dp"
                        android:layout_marginTop="8dp"
                        android:text="過去1週間"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <TextView
                        android:id="@+id/week_count_temple_title"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginEnd="8dp"
                        android:layout_marginStart="8dp"
                        android:text="神殿の周回数"
                        android:textSize="@dimen/history_card_title_size"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toBottomOf="@id/week_count_temple_value" />

                    <TextView
                        android:id="@+id/week_count_temple_value"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="24dp"
                        android:text="@{historyViewModel.weekTempleCount}"
                        android:textColor="#000000"
                        android:textSize="@dimen/hisotry_card_value_size"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <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/week_count_temple_title">

                        <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="#000000"
                                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="#000000"
                                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="#000000"
                                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>

            <!--<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>-->
        </android.support.constraint.ConstraintLayout>
    </ScrollView>
</layout>