Newer
Older
MonCalc / app / src / main / res / layout / regist_overlay.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"
    xmlns:tools="http://schemas.android.com/tools">

    <data>

        <variable
            name="viewModel"
            type="jackall.moncalc.viewmodel.OverlayViewModel" />

        <variable
            name="registViewModel"
            type="jackall.moncalc.viewmodel.OverlayRegistViewModel" />
    </data>

    <android.support.constraint.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#55000000"
        android:paddingTop="@dimen/statusbar_height">

        <Button
            android:id="@+id/regist_btn"
            android:layout_width="@dimen/regist_button_width"
            android:layout_height="@dimen/regist_button_height"
            android:layout_marginEnd="4dp"
            android:onClick="@{registViewModel.onClickRegist}"
            android:text="@string/registration"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="@+id/regist_add_list" />

        <Button
            android:id="@+id/min_btn"
            android:layout_width="@dimen/regist_button_width"
            android:layout_height="@dimen/regist_button_height"
            android:layout_marginEnd="8dp"
            android:layout_marginTop="8dp"
            android:onClick="@{viewModel.onClickMin}"
            android:text="@string/minimize"
            app:layout_constraintEnd_toStartOf="@+id/finish_btn"
            app:layout_constraintTop_toTopOf="parent" />

        <Button
            android:id="@+id/finish_btn"
            android:layout_width="@dimen/regist_button_width"
            android:layout_height="@dimen/regist_button_height"
            android:layout_marginEnd="8dp"
            android:layout_marginTop="8dp"
            android:onClick="@{viewModel.onClickFinish}"
            android:text="@string/overlay_finish"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <android.support.v7.widget.RecyclerView
            android:id="@+id/regist_list"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginEnd="6dp"
            android:layout_marginStart="6dp"
            android:layout_marginTop="2dp"
            android:setRecyclerAdapter="@{registViewModel.registAdapter}"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/temple_spinner_layout" />

        <Button
            android:id="@+id/regist_add_list"
            android:layout_width="@dimen/regist_button_width"
            android:layout_height="@dimen/regist_button_height"
            android:layout_marginStart="2dp"
            android:onClick="@{registViewModel.onClickAdd}"
            android:text="追加"
            app:layout_constraintStart_toEndOf="@+id/regist_remove_list"
            app:layout_constraintTop_toBottomOf="@+id/regist_list" />

        <Button
            android:id="@+id/regist_remove_list"
            android:layout_width="@dimen/regist_button_width"
            android:layout_height="@dimen/regist_button_height"
            android:layout_marginStart="4dp"
            android:onClick="@{registViewModel.onClickRemove}"
            android:text="削除"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="@+id/regist_add_list" />

        <FrameLayout
            android:id="@+id/temple_spinner_layout"
            android:layout_width="0dp"
            android:layout_height="36dp"
            android:layout_marginEnd="8dp"
            android:layout_marginStart="8dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/finish_btn">

            <Spinner
                android:id="@+id/temple_spinner"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@drawable/custom_spinner_dropdown"
                android:selectedItemPosition="@={registViewModel.templeRank}" />
        </FrameLayout>
    </android.support.constraint.ConstraintLayout>
</layout>