<?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="mainViewModel" type="jackall.overlaymulticounter.viewmodel.MainViewModel" /> </data> <android.support.constraint.ConstraintLayout android:layout_width="match_parent" android:layout_height="match_parent" android:background="#96ffffff" android:focusable="true" android:focusableInTouchMode="true"> <FrameLayout android:id="@+id/main_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/main_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/main_banner_frame"> <ImageButton 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="@{mainViewModel.onClickRemove}" android:padding="4dp" android:scaleType="fitCenter" android:src="@drawable/icon_minus" android:text="@string/remove" /> <ImageButton 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="@{mainViewModel.onClickAdd}" android:padding="4dp" android:scaleType="fitCenter" android:src="@drawable/icon_plus" android:text="@string/add" /> <ImageButton 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="@{mainViewModel.onClickResetAll}" android:padding="4dp" android:scaleType="fitCenter" android:src="@drawable/icon_reset" android:text="@string/reset_all" /> <ImageButton 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="@{mainViewModel.onClickClose}" android:padding="4dp" android:scaleType="fitCenter" android:src="@drawable/icon_minimization" android:text="@string/overlay_minimization" /> <ImageButton android:id="@+id/main_service_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="@{mainViewModel.onClickStartService}" 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="@{mainViewModel.counterAdapter}" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/main_button_layout" /> </android.support.constraint.ConstraintLayout> </layout>