feat(categoryCreate): Add UI layout

This commit is contained in:
Peter Vacho 2025-01-04 23:44:33 +01:00
parent bc72deeaf6
commit 2e83463190
Signed by: school
GPG key ID: 8CFC3837052871B4
2 changed files with 70 additions and 4 deletions

View file

@ -1,10 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<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:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.CreateCategoryActivity">
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="16dp"
android:padding="16dp"
app:cardCornerRadius="8dp"
app:cardElevation="4dp">
<LinearLayout
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<!-- Category Name -->
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/category_name"
app:boxStrokeWidth="1dp"
app:boxStrokeColor="?attr/colorPrimary">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etCategoryName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
tools:text="Work" />
</com.google.android.material.textfield.TextInputLayout>
<!-- Color Picker -->
<com.google.android.material.button.MaterialButton
android:id="@+id/btnColorPicker"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/select_color"
app:icon="@drawable/ic_circle"
app:iconTint="@android:color/holo_blue_dark"
app:cornerRadius="8dp"
style="@style/Widget.MaterialComponents.Button.OutlinedButton" />
<!-- Save Button -->
<com.google.android.material.button.MaterialButton
android:id="@+id/btnSaveCategory"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="@string/save"
app:cornerRadius="8dp" />
<!-- Cancel Button -->
<com.google.android.material.button.MaterialButton
android:id="@+id/btnCancel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/cancel"
app:icon="@drawable/ic_arrow_back"
app:iconGravity="textStart"
app:iconPadding="8dp"
style="@style/Widget.MaterialComponents.Button.OutlinedButton" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</FrameLayout>

View file

@ -85,4 +85,5 @@
<string name="categories">Categories</string>
<string name="delete_category">Delete category</string>
<string name="event_details">Event Details</string>
<string name="category_name">Category Name</string>
</resources>