VerveDo/app/src/main/res/layout/bottom_sheet_todo.xml
2024-08-15 11:20:21 +08:00

179 lines
No EOL
8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
android:id="@+id/drag_handle"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="20dp"
android:paddingRight="20dp">
<TextView
android:id="@+id/todo_sheet_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/add_task"
android:textAlignment="center"
android:textColor="?android:attr/textColorPrimary"
android:textSize="25sp" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/todo_content"
style="?attr/textInputFilledExposedDropdownMenuStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="25dp"
android:gravity="center_horizontal"
android:hint="@string/tasks_textfield_hint"
app:errorEnabled="true"
app:helperText=" "
app:helperTextEnabled="true">
<AutoCompleteTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:labelFor="@string/tasks_textfield_hint"
app:simpleItems="@array/todo_predicts" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.chip.ChipGroup
android:id="@+id/todo_subject"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
app:chipSpacing="5dp"
app:selectionRequired="true"
app:singleSelection="true">
<com.google.android.material.chip.Chip
android:id="@+id/unknown_subject"
style="@style/Widget.Material3.Chip.Filter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/subject_unknown" />
<com.google.android.material.chip.Chip
android:id="@+id/subject_chinese"
style="@style/Widget.Material3.Chip.Filter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/subject_chinese" />
<com.google.android.material.chip.Chip
android:id="@+id/subject_math"
style="@style/Widget.Material3.Chip.Filter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/subject_math" />
<com.google.android.material.chip.Chip
android:id="@+id/subject_english"
style="@style/Widget.Material3.Chip.Filter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/subject_english" />
<com.google.android.material.chip.Chip
android:id="@+id/subject_biology"
style="@style/Widget.Material3.Chip.Filter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/subject_biology" />
<com.google.android.material.chip.Chip
android:id="@+id/subject_physics"
style="@style/Widget.Material3.Chip.Filter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/subject_physics" />
<com.google.android.material.chip.Chip
android:id="@+id/subject_history"
style="@style/Widget.Material3.Chip.Filter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/subject_history" />
<com.google.android.material.chip.Chip
android:id="@+id/subject_geography"
style="@style/Widget.Material3.Chip.Filter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/subject_geography" />
<com.google.android.material.chip.Chip
android:id="@+id/subject_law"
style="@style/Widget.Material3.Chip.Filter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/subject_law" />
<com.google.android.material.chip.Chip
android:id="@+id/subject_other"
style="@style/Widget.Material3.Chip.Filter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/subject_other" />
</com.google.android.material.chip.ChipGroup>
<TextView
android:id="@+id/todo_uuid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textColor="?android:attr/textColorPrimary"
android:textSize="15sp"
android:visibility="gone" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="35dp"
android:layout_marginBottom="50dp"
android:gravity="center_horizontal"
android:orientation="horizontal">
<Button
android:id="@+id/btn_cancel"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cancel" />
<Button
android:id="@+id/btn_delete"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/delete_one"
android:textColor="?android:attr/textColorPrimary"
android:visibility="gone"
app:backgroundTint="?attr/colorErrorContainer" />
<Button
android:id="@+id/btn_save"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="@string/save" />
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>