<?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="org.ntlab.leftoverrecipe.viewmodel.MenuViewModel" /> </data> <android.support.constraint.ConstraintLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.design.widget.FloatingActionButton android:id="@+id/fabRecipePlus" animation="@{viewModel.count}" android:layout_width="64dp" android:layout_height="64dp" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp" android:onClick="@{viewModel.onClickPlus}" android:src="@drawable/ic_action_add_recipe" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:pressedTranslationZ="12dp" /> <android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.AppBarLayout android:id="@+id/appBarLayout" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#ffffff"> <android.support.constraint.ConstraintLayout android:layout_width="match_parent" android:layout_height="wrap_content" app:layout_scrollFlags="scroll|enterAlways"> <android.support.v7.widget.Toolbar android:id="@+id/customToolbar" android:layout_width="match_parent" android:layout_height="56dp" android:background="@color/colorPrimary" android:elevation="8dp" android:theme="@style/MyAppBarLayoutTheme"></android.support.v7.widget.Toolbar> <ImageView android:id="@+id/imageView2" android:layout_width="112dp" android:layout_height="wrap_content" android:layout_marginStart="32dp" android:layout_marginTop="8dp" android:duplicateParentState="true" android:src="@drawable/day_count" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/customToolbar" /> <TextView android:id="@+id/textView5" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="26dp" android:layout_marginStart="10dp" android:text="日" android:textColor="@color/colorPrimary" android:textSize="24dp" app:layout_constraintBottom_toBottomOf="@+id/imageView2" app:layout_constraintStart_toEndOf="@+id/imageView2" /> <ImageView android:id="@+id/imageView3" android:layout_width="124dp" android:layout_height="wrap_content" android:layout_marginEnd="54dp" android:layout_marginTop="8dp" android:duplicateParentState="true" android:src="@drawable/recipe_count" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@+id/customToolbar" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="0dp" android:layout_marginStart="0dp" android:text="品" android:textColor="@color/colorPrimary" android:textSize="24dp" app:layout_constraintBottom_toBottomOf="@+id/textView5" app:layout_constraintStart_toEndOf="@+id/imageView3" /> <!--日数--> <TextView 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="36dp" android:text="@{viewModel.dayCount}" android:textColor="@color/colorPrimary" android:textSize="42dp" app:layout_constraintBottom_toBottomOf="@+id/imageView2" app:layout_constraintEnd_toEndOf="@+id/imageView2" app:layout_constraintStart_toStartOf="@+id/imageView2" app:layout_constraintTop_toTopOf="@+id/imageView2" /> <!--品数--> <TextView 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="36dp" android:text="@{viewModel.recipeCount}" android:textColor="@color/colorPrimary" android:textSize="42dp" app:layout_constraintBottom_toBottomOf="@+id/imageView3" app:layout_constraintEnd_toEndOf="@+id/imageView3" app:layout_constraintStart_toStartOf="@+id/imageView3" app:layout_constraintTop_toTopOf="@+id/imageView3" /> </android.support.constraint.ConstraintLayout> </android.support.design.widget.AppBarLayout> <android.support.v7.widget.RecyclerView android:id="@+id/menuRecyclerView" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="4dp" app:layout_behavior="@string/appbar_scrolling_view_behavior" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/appBarLayout"></android.support.v7.widget.RecyclerView> </android.support.design.widget.CoordinatorLayout> <android.support.design.widget.FloatingActionButton android:id="@+id/fabSearchButton" animation="@{viewModel.count}" android:layout_width="54dp" android:layout_height="54dp" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:backgroundTint="#cecece" android:clickable="true" android:elevation="6dp" android:onClick="@{viewModel.onClickSearch}" android:src="@drawable/ic_action_search" android:visibility="gone" app:borderWidth="0dp" app:layout_constraintBottom_toTopOf="@+id/fabRecipePlus" app:layout_constraintEnd_toEndOf="@+id/fabRecipePlus" app:layout_constraintStart_toStartOf="@+id/fabRecipePlus" app:pressedTranslationZ="12dp" /> <android.support.design.widget.FloatingActionButton android:id="@+id/fabAddRecipe" animation="@{viewModel.count}" android:layout_width="54dp" android:layout_height="54dp" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp" android:layout_marginStart="8dp" android:backgroundTint="#e1e1e1" android:clickable="true" android:elevation="6dp" android:onClick="@{viewModel.onClickRegistRecipe}" android:src="@drawable/ic_action_name" android:visibility="gone" app:borderWidth="0dp" app:layout_constraintBottom_toTopOf="@+id/fabSearchButton" app:layout_constraintEnd_toEndOf="@+id/fabRecipePlus" app:layout_constraintStart_toStartOf="@+id/fabRecipePlus" app:pressedTranslationZ="12dp" /> <FrameLayout android:id="@+id/popupBackground" animation="@{viewModel.count}" android:layout_width="match_parent" android:layout_height="match_parent" android:alpha="0.7" android:background="#bd000000" android:clickable="true" android:visibility="gone"></FrameLayout> </android.support.constraint.ConstraintLayout> </layout>