Newer
Older
MonCalc / app / src / main / res / layout / fragment_analyze_fruit.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="fruitAnalyzeViewModel"
            type="jackall.moncalc.viewmodel.FruitAnalyzeViewModel" />
    </data>

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">

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

        <LinearLayout
            android:id="@+id/analyze_fruit_list_header"
            android:layout_width="match_parent"
            android:layout_height="24dp"
            android:layout_marginEnd="8dp"
            android:layout_marginStart="8dp"
            android:layout_marginTop="8dp"
            android:background="#ffffff"
            android:orientation="horizontal"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <TextView
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="2"
                android:background="#000000"
                android:gravity="center"
                android:text="実"
                android:textColor="#ffffff" />

            <TextView
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_marginStart="1dp"
                android:layout_weight="1"
                android:background="#000000"
                android:gravity="center"
                android:text="特急L"
                android:textColor="#ffffff" />

            <TextView
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_marginStart="1dp"
                android:layout_weight="1"
                android:background="#000000"
                android:gravity="center"
                android:text="特急M"
                android:textColor="#ffffff" />

            <TextView
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_marginStart="1dp"
                android:layout_weight="1"
                android:background="#000000"
                android:gravity="center"
                android:text="特急"
                android:textColor="#ffffff" />

            <TextView
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_marginStart="1dp"
                android:layout_weight="1"
                android:background="#000000"
                android:gravity="center"
                android:text="1級L"
                android:textColor="#ffffff" />

            <TextView
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_marginStart="1dp"
                android:layout_weight="1"
                android:background="#000000"
                android:gravity="center"
                android:text="1級M"
                android:textColor="#ffffff" />

            <TextView
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_marginStart="1dp"
                android:layout_weight="1"
                android:background="#000000"
                android:gravity="center"
                android:text="1級"
                android:textColor="#ffffff" />


        </LinearLayout>

        <android.support.v7.widget.RecyclerView
            android:id="@+id/analyze_fruit_list"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginEnd="8dp"
            android:layout_marginStart="8dp"
            android:setFruitTempleList="@{fruitAnalyzeViewModel.items}"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/analyze_fruit_list_header" />

        <com.github.mikephil.charting.charts.PieChart
            android:id="@+id/fruit_pie_chart"
            android:layout_width="match_parent"
            android:layout_height="400dp"
            android:layout_marginEnd="8dp"
            android:layout_marginStart="8dp"
            android:fruitPieChart="@{fruitAnalyzeViewModel.pieData}"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/analyze_fruit_list" />

    </android.support.constraint.ConstraintLayout>

    </ScrollView>
</layout>