Futsch1/medTimer

View on GitHub
app/src/main/res/layout-land/fragment_edit_medicine.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".medicine.EditMedicineFragment">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"

        android:orientation="horizontal">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="16dp"
            android:layout_weight="1"
            android:orientation="vertical"
            android:padding="5dp">

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

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/selectIcon"
                    style="?attr/materialIconButtonFilledStyle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    app:iconPadding="0dp" />

                <com.google.android.material.textfield.TextInputLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="4dp"
                    android:hint="@string/medicine_name">

                    <com.google.android.material.textfield.TextInputEditText
                        android:id="@+id/editMedicineName"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:inputType="text" />

                </com.google.android.material.textfield.TextInputLayout>
            </LinearLayout>

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

                <com.google.android.material.materialswitch.MaterialSwitch
                    android:id="@+id/enableColor"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/color" />

                <Space
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/selectColor"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:text="@string/select_color" />
            </LinearLayout>

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

                <com.google.android.material.textfield.TextInputLayout
                    android:id="@+id/notificationImportanceLayout"
                    style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="8dp"
                    android:hint="@string/notification_importance"
                    android:orientation="horizontal">

                    <com.google.android.material.textfield.MaterialAutoCompleteTextView
                        android:id="@+id/notificationImportance"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:hint="@string/notification_importance"
                        android:inputType="none" />
                </com.google.android.material.textfield.TextInputLayout>

                <Space
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/openCalendar"
                    style="?attr/materialIconButtonFilledStyle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:contentDescription="@string/calendar"
                    app:icon="@drawable/calendar_week"
                    app:iconPadding="0dp" />
            </LinearLayout>
        </LinearLayout>

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/reminderList"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:clipToPadding="false"
            android:contentDescription="@string/reminders"
            android:paddingBottom="60dp"
            android:scrollbars="vertical" />
    </LinearLayout>

    <com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
        android:id="@+id/addReminder"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|end"
        android:layout_margin="8dp"
        android:clickable="true"
        android:text="@string/add_reminder"
        app:icon="@android:drawable/ic_menu_add" />

</FrameLayout>