feat(day-activity): Add new event ui button
This commit is contained in:
parent
7b73395c08
commit
5ec0dbe7b7
9
app/src/main/res/drawable/ic_add.xml
Normal file
9
app/src/main/res/drawable/ic_add.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
<path
|
||||
android:pathData="M440,520L200,520v-80h240v-240h80v240h240v80L520,520v240h-80v-240Z"
|
||||
android:fillColor="#e8eaed"/>
|
||||
</vector>
|
|
@ -1,4 +1,3 @@
|
|||
<?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"
|
||||
|
@ -10,15 +9,37 @@
|
|||
android:padding="16dp"
|
||||
tools:context=".activities.DayViewActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDate"
|
||||
android:layout_width="wrap_content"
|
||||
<!-- Row for Date and Add Button -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_gravity="center"
|
||||
tools:text="2025-01-01"/>
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="?android:attr/dividerHorizontal"> <!-- Bottom border -->
|
||||
|
||||
<!-- Date -->
|
||||
<TextView
|
||||
android:id="@+id/tvDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="2025-01-01" />
|
||||
|
||||
<!-- Add Button -->
|
||||
<ImageButton
|
||||
android:id="@+id/btnAddEvent"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_add"
|
||||
android:contentDescription="@string/add_event"
|
||||
app:tint="?android:attr/textColorPrimary" />
|
||||
</FrameLayout>
|
||||
|
||||
<!-- Event List -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvEvents"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -26,4 +47,4 @@
|
|||
tools:listitem="@layout/item_event_card"
|
||||
tools:itemCount="5"
|
||||
tools:visibility="visible" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -31,4 +31,5 @@
|
|||
<string name="show_stack_trace">Show stack trace</string>
|
||||
<string name="delete_event">Delete this event</string>
|
||||
<string name="edit_event">Edit this event</string>
|
||||
<string name="add_event">Add a new event</string>
|
||||
</resources>
|
Loading…
Reference in a new issue