Added an options menu for events; moved delete option to the new options menu

This commit is contained in:
denizk0461
2023-05-21 22:16:20 +02:00
parent e99a58de54
commit 75724ace18
15 changed files with 519 additions and 51 deletions
@@ -0,0 +1,206 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat 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="wrap_content"
android:orientation="vertical"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<com.google.android.material.button.MaterialButton
style="@style/SheetCloseButton"
android:id="@+id/button_dismiss"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/event_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="22sp"
android:paddingHorizontal="24dp"
android:layout_marginBottom="8dp"
android:fontFamily="@font/lato_bolditalic"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/button_cancel"/>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="16dp">
<!-- Edit event -->
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/button_edit_event"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/selectable_item_background"
android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
android:paddingHorizontal="20dp"
android:paddingVertical="16dp">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginHorizontal="8dp"
android:scaleType="centerInside"
android:tint="?attr/colorText"
android:src="@drawable/edit"
android:importantForAccessibility="no"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sheet_event_action_edit_event_title"
android:textSize="16sp"/>
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- Add task -->
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/button_add_task"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/selectable_item_background"
android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
android:paddingHorizontal="20dp"
android:paddingVertical="16dp">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginHorizontal="8dp"
android:scaleType="centerInside"
android:tint="?attr/colorText"
android:src="@drawable/add_task"
android:importantForAccessibility="no"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sheet_event_action_add_task_title"
android:textSize="16sp"/>
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- View tasks -->
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/button_view_tasks"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/selectable_item_background"
android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
android:paddingHorizontal="20dp"
android:paddingVertical="16dp">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginHorizontal="8dp"
android:scaleType="centerInside"
android:tint="?attr/colorText"
android:src="@drawable/task"
android:importantForAccessibility="no"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sheet_event_action_view_tasks_title"
android:textSize="16sp"/>
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- Find room -->
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/button_find_room"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/selectable_item_background"
android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
android:paddingHorizontal="20dp"
android:paddingVertical="16dp">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginHorizontal="8dp"
android:scaleType="centerInside"
android:tint="?attr/colorText"
android:src="@drawable/location"
android:importantForAccessibility="no"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sheet_event_action_find_room_title"
android:textSize="16sp"/>
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- Delete event -->
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/button_delete_event"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/selectable_item_background"
android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
android:paddingHorizontal="20dp"
android:paddingVertical="16dp">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginHorizontal="8dp"
android:scaleType="centerInside"
android:tint="?attr/colorError"
android:src="@drawable/delete"
android:importantForAccessibility="no"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sheet_event_action_delete_event_title"
android:textSize="16sp"
android:textColor="?attr/colorError"/>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.core.widget.NestedScrollView>
</androidx.appcompat.widget.LinearLayoutCompat>