Newer
Older
OverlayMultiCounter / app / src / main / res / layout / overlay_counter.xml
MatsumotoKeiju on 9 Nov 2017 3 KB [add] Edit counter title
<?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="overlayViewModel"
            type="jackall.overlaymulticounter.viewmodel.OverlayViewModel" />

        <variable
            name="counterViewModel"
            type="jackall.overlaymulticounter.viewmodel.OverlayCounterViewModel" />
    </data>

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

        <Button
            android:id="@+id/overlay_finish_button"
            android:layout_width="@dimen/overlay_counter_button_width"
            android:layout_height="wrap_content"
            android:layout_marginEnd="@dimen/overlay_layout_margin"
            android:layout_marginTop="@dimen/overlay_layout_margin"
            android:onClick="@{overlayViewModel.onClickFinish}"
            android:text="@string/overlay_finish"
            android:textSize="@dimen/overlay_counter_text_size"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <Button
            android:id="@+id/overlay_minimization_button"
            android:layout_width="@dimen/overlay_counter_button_width"
            android:layout_height="wrap_content"
            android:onClick="@{overlayViewModel.onClickMin}"
            android:text="@string/overlay_minimization"
            android:textSize="@dimen/overlay_counter_text_size"
            app:layout_constraintEnd_toStartOf="@id/overlay_finish_button"
            app:layout_constraintTop_toTopOf="@id/overlay_finish_button" />

        <Button
            android:id="@+id/overlay_counter_add"
            android:layout_width="@dimen/overlay_counter_button_width"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/overlay_layout_margin"
            android:onClick="@{counterViewModel.onClickAdd}"
            android:text="@string/add"
            android:textSize="@dimen/overlay_counter_text_size"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="@id/overlay_finish_button" />

        <Button
            android:id="@+id/overlay_counter_remove"
            android:layout_width="@dimen/overlay_counter_button_width"
            android:layout_height="wrap_content"
            android:onClick="@{counterViewModel.onClickRemove}"
            android:text="@string/remove"
            android:textSize="@dimen/overlay_counter_text_size"
            app:layout_constraintStart_toEndOf="@id/overlay_counter_add"
            app:layout_constraintTop_toTopOf="@id/overlay_finish_button" />

        <Button
            android:layout_width="@dimen/overlay_counter_button_width"
            android:layout_height="wrap_content"
            android:onClick="@{counterViewModel.onClickResetAll}"
            android:text="@string/reset_all"
            android:textSize="@dimen/overlay_counter_text_size"
            app:layout_constraintStart_toEndOf="@id/overlay_counter_remove"
            app:layout_constraintTop_toTopOf="@id/overlay_finish_button" />

        <android.support.v7.widget.RecyclerView
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_margin="@dimen/overlay_layout_margin"
            android:setCounterAdapter="@{counterViewModel.counterAdapter}"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/overlay_finish_button" />
    </android.support.constraint.ConstraintLayout>
</layout>