Product files

loads details of product, categories and cost of it
This commit is contained in:
Nikitha
2026-03-29 16:29:40 -06:00
parent 653ae3f233
commit 2ad097413b
7 changed files with 379 additions and 279 deletions

View File

@@ -12,7 +12,6 @@
android:orientation="vertical">
<LinearLayout
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="@color/primary_dark"
@@ -21,7 +20,7 @@
android:paddingEnd="16dp">
<ImageButton
android:id="@+id/btnHamburger"
android:id="@+id/btnHamburgerProduct"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/baseline_menu_36"
@@ -43,7 +42,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:hint="Search by product name or category..."
android:hint="Search by name or category..."
android:inputType="text"
android:drawableStart="@android:drawable/ic_menu_search"
android:drawablePadding="8dp"

View File

@@ -28,10 +28,9 @@
android:id="@+id/btnDeleteProduct"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:backgroundTint="@color/accent_coral"
android:text="Delete"
android:textColor="@color/white" />
android:textColor="@color/white"/>
</LinearLayout>
@@ -65,6 +64,7 @@
android:layout_gravity="end"
android:layout_marginBottom="8dp"/>
<!-- Product Name -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -81,6 +81,22 @@
android:inputType="text"
android:layout_marginBottom="16dp"/>
<!-- Category -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Category"
android:textColor="@color/text_dark"
android:textSize="12sp"
android:layout_marginBottom="4dp"/>
<Spinner
android:id="@+id/spinnerProductCategory"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"/>
<!-- Description -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -93,27 +109,12 @@
android:id="@+id/etProductDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:hint="Enter product description"
android:hint="Enter description"
android:inputType="textMultiLine"
android:minLines="1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Category"
android:textColor="@color/text_dark"
android:textSize="12sp"
android:layout_marginBottom="4dp"/>
<EditText
android:id="@+id/etProductCategory"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="e.g. Food, Toys, Grooming"
android:inputType="text"
android:minLines="2"
android:layout_marginBottom="16dp"/>
<!-- Price -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -126,24 +127,9 @@
android:id="@+id/etProductPrice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter price"
android:hint="0.00"
android:inputType="numberDecimal"
android:layout_marginBottom="16dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Stock Quantity"
android:textColor="@color/text_dark"
android:textSize="12sp"
android:layout_marginBottom="4dp"/>
<EditText
android:id="@+id/etStockQuantity"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter stock quantity"
android:inputType="number"/>
android:layout_marginBottom="8dp"/>
</LinearLayout>