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

    <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="#98000000"
        android:paddingTop="@dimen/statusbar_height">

        <FrameLayout
            android:id="@+id/overlayBannerLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <Button
            android:id="@+id/regist_btn"
            android:layout_width="@dimen/regist_button_width"
            android:layout_height="@dimen/regist_button_height"
            android:layout_marginEnd="8dp"
            android:background="@drawable/shape_service_button"
            android:onClick="@{registViewModel.onClickRegist}"
            android:text="@string/registration"
            android:textColor="#ffffff"
            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:background="@drawable/shape_service_button"
            android:onClick="@{viewModel.onClickMin}"
            android:text="@string/minimize"
            android:textColor="#ffffff"
            app:layout_constraintEnd_toStartOf="@+id/finish_btn"
            app:layout_constraintTop_toTopOf="@+id/finish_btn" />

        <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:background="@drawable/shape_service_button"
            android:onClick="@{viewModel.onClickFinish}"
            android:text="@string/overlay_finish"
            android:textColor="#ffffff"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/overlayBannerLayout" />

        <android.support.v7.widget.RecyclerView
            android:id="@+id/regist_list"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginEnd="8dp"
            android:layout_marginStart="8dp"
            android:layout_marginTop="8dp"
            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="8dp"
            android:background="@drawable/shape_service_button"
            android:onClick="@{registViewModel.onClickAdd}"
            android:text="追加"
            android:textColor="#ffffff"
            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="8dp"
            android:background="@drawable/shape_service_button"
            android:onClick="@{registViewModel.onClickRemove}"
            android:text="削除"
            android:textColor="#ffffff"
            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"
            android:layout_marginTop="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>