Newer
Older
LeftoverRecipe / app / src / main / res / layout / activity_detail_recipe.xml
MatsumotoKeiju on 9 Jul 2017 3 KB [add] LeftoverRecipe Project
<?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.DetailRecipeActivity">

    <data>

        <variable
            name="viewModel"
            type="org.ntlab.leftoverrecipe.viewmodel.DetailRecipeViewModel" />

    </data>

    <android.support.constraint.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <ImageView
            android:id="@+id/hogeImage"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="gone" />

        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <TextView
                    android:id="@+id/detailTitle"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="8dp"
                    android:text="@{viewModel.recipeTitle}"
                    android:textSize="14dp" />

                <ImageView
                    android:id="@+id/detailImageView"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:adjustViewBounds="true"
                    android:padding="8dp"
                    app:imageUrl="@{viewModel.imageUrl}" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="作り方"/>

                <TextView
                    android:id="@+id/detailStepTextView"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:padding="8dp"
                    android:text="@{viewModel.stepText}"
                    android:textSize="14dp" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="材料" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:padding="8dp"
                    android:text="@{viewModel.material}"
                    android:textSize="14dp" />

            </LinearLayout>

        </ScrollView>

        <android.support.design.widget.FloatingActionButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginEnd="8dp"
            android:clickable="true"
            android:onClick="@{viewModel.onClickFab}"
            android:padding="5dp"
            android:src="@drawable/float_regist"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent" />

    </android.support.constraint.ConstraintLayout>
</layout>