<?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" tools:context=".activity.SearchActivity"> <data> <variable name="viewModel" type="org.ntlab.leftoverrecipe.viewmodel.SearchViewModel" /> </data> <android.support.constraint.ConstraintLayout android:layout_width="match_parent" android:layout_height="match_parent"> <com.beardedhen.androidbootstrap.BootstrapEditText android:id="@+id/bootstrapEditText" android:layout_width="0dp" android:layout_height="40dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:hint="食材を入力して下さい" android:text="@={viewModel.materialName}" app:bootstrapBrand="primary" app:bootstrapSize="lg" app:layout_constraintEnd_toStartOf="@+id/bootstrapButton" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:roundedCorners="true" /> <com.beardedhen.androidbootstrap.BootstrapButton android:id="@+id/bootstrapButton" android:layout_width="60dp" android:layout_height="40dp" android:layout_marginEnd="8dp" android:layout_marginTop="8dp" android:onClick="@{viewModel.onClickSearch}" app:bootstrapBrand="primary" app:bootstrapSize="lg" app:fontAwesomeIcon="fa_search" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" app:roundedCorners="true" /> <android.support.v7.widget.RecyclerView android:id="@+id/searchListView" android:layout_width="0dp" android:layout_height="0dp" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/bootstrapButton"> </android.support.v7.widget.RecyclerView> <ProgressBar android:id="@+id/progressBar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:visibility="@{viewModel.progressBarVisibility}" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> </android.support.constraint.ConstraintLayout> </layout>