feat: Add show day names in calendar

This commit is contained in:
Peter Vacho 2024-12-24 17:21:55 +01:00
parent 86bbde2f29
commit a1d96a4d01
Signed by: school
GPG key ID: 8CFC3837052871B4
2 changed files with 77 additions and 3 deletions

View file

@ -17,15 +17,82 @@
tools:text="January 2024"
android:textAppearance="?attr/textAppearanceHeadline6"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<!-- Day Names Row -->
<LinearLayout
android:id="@+id/dayNamesRow"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
app:layout_constraintTop_toBottomOf="@id/tvMonthYear"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/monday_short"
android:textAppearance="?attr/textAppearanceBody1" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/tuesday_short"
android:textAppearance="?attr/textAppearanceBody1" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/wednesday_short"
android:textAppearance="?attr/textAppearanceBody1" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/thursday_short"
android:textAppearance="?attr/textAppearanceBody1" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/friday_short"
android:textAppearance="?attr/textAppearanceBody1" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/saturday_short"
android:textAppearance="?attr/textAppearanceBody1" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/sunday_short"
android:textAppearance="?attr/textAppearanceBody1" />
</LinearLayout>
<!-- Calendar RecyclerView -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvCalendar"
android:layout_width="0dp"
android:layout_height="0dp"
android:padding="8dp"
app:layout_constraintTop_toBottomOf="@id/tvMonthYear"
app:layout_constraintTop_toBottomOf="@id/dayNamesRow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"

View file

@ -16,4 +16,11 @@
<string name="base_url_hint">https://myapiurl.com</string>
<string name="save">Save</string>
<string name="cancel">Cancel</string>
<string name="monday_short">Mo</string>
<string name="tuesday_short">Tu</string>
<string name="wednesday_short">We</string>
<string name="thursday_short">Th</string>
<string name="friday_short">Fr</string>
<string name="saturday_short">Sa</string>
<string name="sunday_short">Su</string>
</resources>