Newer
Older
ToDoApp / app / src / main / res / layout / fragment_add_edit_task.xml
<?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="addEditTaskViewModel"
            type="keijumt.todoapp.addtask.AddEditTaskViewModel" />
    </data>

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

        <EditText
            android:id="@+id/edit_text_task_title"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginEnd="@dimen/margin_small"
            android:layout_marginStart="@dimen/margin_small"
            android:layout_marginTop="@dimen/margin_small"
            android:hint="@string/taskTitle"
            android:text="@={addEditTaskViewModel.taskTitle}"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <EditText
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_marginBottom="@dimen/margin_small"
            android:layout_marginEnd="@dimen/margin_small"
            android:layout_marginStart="@dimen/margin_small"
            android:gravity="top"
            android:hint="@string/taskDetails"
            android:inputType="textMultiLine"
            android:text="@={addEditTaskViewModel.taskDetails}"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/edit_text_task_title" />

        <android.support.design.widget.FloatingActionButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/margin_medium"
            android:layout_marginEnd="@dimen/margin_medium"
            android:clickable="true"
            android:src="@drawable/ic_check"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent" />

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