<?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="#96ffffff" android:paddingTop="@dimen/status_bar_height"> <FrameLayout android:id="@+id/overlay_banner_frame" 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" /> <LinearLayout android:id="@+id/overlay_button_layout" android:layout_width="match_parent" android:layout_height="32dp" android:layout_marginTop="8dp" android:orientation="horizontal" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/overlay_banner_frame"> <ImageButton android:id="@+id/overlay_counter_remove" android:layout_width="0dp" android:layout_height="match_parent" android:layout_marginEnd="4dp" android:layout_marginStart="8dp" android:layout_weight="1" android:background="@drawable/shape_counter_button" android:onClick="@{counterViewModel.onClickRemove}" android:padding="4dp" android:scaleType="fitCenter" android:src="@drawable/icon_minus" android:text="@string/remove" /> <ImageButton android:id="@+id/overlay_counter_add" android:layout_width="0dp" android:layout_height="match_parent" android:layout_marginEnd="4dp" android:layout_marginStart="4dp" android:layout_weight="1" android:background="@drawable/shape_counter_button" android:onClick="@{counterViewModel.onClickAdd}" android:padding="4dp" android:scaleType="fitCenter" android:src="@drawable/icon_plus" android:text="@string/add" /> <ImageButton android:id="@+id/overlay_counter_all_reset" android:layout_width="0dp" android:layout_height="match_parent" android:layout_marginEnd="4dp" android:layout_marginStart="4dp" android:layout_weight="1" android:background="@drawable/shape_counter_button" android:onClick="@{counterViewModel.onClickResetAll}" android:padding="4dp" android:scaleType="fitCenter" android:src="@drawable/icon_reset" android:text="@string/reset_all" /> <ImageButton android:id="@+id/overlay_minimization_button" android:layout_width="0dp" android:layout_height="match_parent" android:layout_marginEnd="4dp" android:layout_marginStart="4dp" android:layout_weight="1" android:background="@drawable/shape_counter_button" android:onClick="@{overlayViewModel.onClickMin}" android:padding="4dp" android:scaleType="fitCenter" android:src="@drawable/icon_minimization" android:text="@string/overlay_minimization" /> <ImageButton android:id="@+id/overlay_finish_button" android:layout_width="0dp" android:layout_height="match_parent" android:layout_marginEnd="8dp" android:layout_marginStart="4dp" android:layout_weight="1" android:background="@drawable/shape_counter_button" android:onClick="@{overlayViewModel.onClickFinish}" android:padding="4dp" android:scaleType="fitCenter" android:src="@drawable/icon_power" android:text="@string/overlay_finish" /> </LinearLayout> <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_button_layout" /> </android.support.constraint.ConstraintLayout> </layout>