mirror of
https://github.com/shaulascr/ecommerce_serang.git
synced 2025-12-18 08:41:03 +00:00
update detail store
This commit is contained in:
@ -112,13 +112,17 @@ class DetailProductActivity : AppCompatActivity() {
|
|||||||
when (result) {
|
when (result) {
|
||||||
is Result.Success -> {
|
is Result.Success -> {
|
||||||
updateStoreInfo(result.data)
|
updateStoreInfo(result.data)
|
||||||
|
binding.progressBarDetailStore.visibility = View.GONE
|
||||||
}
|
}
|
||||||
is Result.Error -> {
|
is Result.Error -> {
|
||||||
// Show error message, maybe a Toast or Snackbar
|
// Show error message, maybe a Toast or Snackbar
|
||||||
Toast.makeText(this, "Failed to load store: ${result.exception.message}", Toast.LENGTH_SHORT).show()
|
binding.progressBarDetailStore.visibility = View.GONE
|
||||||
|
Log.e("DetailProfileActivity", "Failed to load store: ${result.exception.message}")
|
||||||
|
Toast.makeText(this, "Kendala memuat toko", Toast.LENGTH_SHORT).show()
|
||||||
}
|
}
|
||||||
is Result.Loading -> {
|
is Result.Loading -> {
|
||||||
// Show loading indicator if needed
|
// Show loading indicator if needed
|
||||||
|
binding.progressBarDetailStore.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -160,6 +164,10 @@ class DetailProductActivity : AppCompatActivity() {
|
|||||||
val products = viewModel.otherProducts.value.orEmpty()
|
val products = viewModel.otherProducts.value.orEmpty()
|
||||||
if (products.isNotEmpty()) {
|
if (products.isNotEmpty()) {
|
||||||
updateOtherProducts(products, storeMap)
|
updateOtherProducts(products, storeMap)
|
||||||
|
} else {
|
||||||
|
binding.emptyOtherProducts.visibility = View.VISIBLE
|
||||||
|
binding.recyclerViewOtherProducts.visibility = View.GONE
|
||||||
|
binding.tvViewAllProducts.visibility = View.GONE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -190,12 +198,14 @@ class DetailProductActivity : AppCompatActivity() {
|
|||||||
private fun updateOtherProducts(products: List<ProductsItem>, storeMap: Map<Int, StoreItem>) {
|
private fun updateOtherProducts(products: List<ProductsItem>, storeMap: Map<Int, StoreItem>) {
|
||||||
if (products.isEmpty()) {
|
if (products.isEmpty()) {
|
||||||
Log.d("DetailProductActivity", "Product list is empty, hiding RecyclerView")
|
Log.d("DetailProductActivity", "Product list is empty, hiding RecyclerView")
|
||||||
binding.recyclerViewOtherProducts.visibility = View.VISIBLE
|
binding.recyclerViewOtherProducts.visibility = View.GONE
|
||||||
|
binding.emptyOtherProducts.visibility = View.VISIBLE
|
||||||
binding.tvViewAllProducts.visibility = View.GONE
|
binding.tvViewAllProducts.visibility = View.GONE
|
||||||
} else {
|
} else {
|
||||||
Log.d("DetailProductActivity", "Displaying product list in RecyclerView")
|
Log.d("DetailProductActivity", "Displaying product list in RecyclerView")
|
||||||
binding.recyclerViewOtherProducts.visibility = View.VISIBLE
|
binding.recyclerViewOtherProducts.visibility = View.VISIBLE
|
||||||
binding.tvViewAllProducts.visibility = View.VISIBLE
|
binding.tvViewAllProducts.visibility = View.VISIBLE
|
||||||
|
binding.emptyOtherProducts.visibility = View.GONE
|
||||||
|
|
||||||
productAdapter = OtherProductAdapter(products, onClick = { product ->
|
productAdapter = OtherProductAdapter(products, onClick = { product ->
|
||||||
handleProductClick(product)
|
handleProductClick(product)
|
||||||
@ -316,11 +326,13 @@ class DetailProductActivity : AppCompatActivity() {
|
|||||||
val limitedReviewList = if (reviewList.isNotEmpty()) listOf(reviewList.first()) else emptyList()
|
val limitedReviewList = if (reviewList.isNotEmpty()) listOf(reviewList.first()) else emptyList()
|
||||||
if (reviewList.isEmpty()) {
|
if (reviewList.isEmpty()) {
|
||||||
binding.recyclerViewReviews.visibility = View.GONE
|
binding.recyclerViewReviews.visibility = View.GONE
|
||||||
|
binding.emptyReview.visibility = View.VISIBLE
|
||||||
binding.tvViewAllReviews.visibility = View.GONE
|
binding.tvViewAllReviews.visibility = View.GONE
|
||||||
// binding.tvNoReviews.visibility = View.VISIBLE
|
// binding.tvNoReviews.visibility = View.VISIBLE
|
||||||
} else {
|
} else {
|
||||||
binding.recyclerViewReviews.visibility = View.VISIBLE
|
binding.recyclerViewReviews.visibility = View.VISIBLE
|
||||||
binding.tvViewAllReviews.visibility = View.VISIBLE
|
binding.tvViewAllReviews.visibility = View.VISIBLE
|
||||||
|
binding.emptyReview.visibility = View.GONE
|
||||||
}
|
}
|
||||||
// binding.tvNoReviews.visibility = View.GONE
|
// binding.tvNoReviews.visibility = View.GONE
|
||||||
reviewsAdapter = ReviewsAdapter(
|
reviewsAdapter = ReviewsAdapter(
|
||||||
@ -519,7 +531,11 @@ class DetailProductActivity : AppCompatActivity() {
|
|||||||
attachProduct = true // This will auto-attach the product!
|
attachProduct = true // This will auto-attach the product!
|
||||||
|
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onResume() {
|
||||||
|
super.onResume()
|
||||||
|
loadData()
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|||||||
@ -88,15 +88,18 @@ class StoreDetailActivity : AppCompatActivity() {
|
|||||||
viewModel.storeDetail.observe(this) { result ->
|
viewModel.storeDetail.observe(this) { result ->
|
||||||
when (result) {
|
when (result) {
|
||||||
is Result.Success -> {
|
is Result.Success -> {
|
||||||
|
binding.progressBarDetailProdItem.visibility = View.GONE
|
||||||
updateStoreInfo(result.data)
|
updateStoreInfo(result.data)
|
||||||
viewModel.loadOtherProducts(result.data.storeId)
|
viewModel.loadOtherProducts(result.data.storeId)
|
||||||
}
|
}
|
||||||
is Result.Error -> {
|
is Result.Error -> {
|
||||||
// Show error message, maybe a Toast or Snackbar
|
// Show error message, maybe a Toast or Snackbar
|
||||||
|
binding.progressBarDetailProdItem.visibility = View.GONE
|
||||||
Toast.makeText(this, "Failed to load store: ${result.exception.message}", Toast.LENGTH_SHORT).show()
|
Toast.makeText(this, "Failed to load store: ${result.exception.message}", Toast.LENGTH_SHORT).show()
|
||||||
}
|
}
|
||||||
is Result.Loading -> {
|
is Result.Loading -> {
|
||||||
// Show loading indicator if needed
|
// Show loading indicator if needed
|
||||||
|
binding.progressBarDetailProdItem.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -109,6 +112,9 @@ class StoreDetailActivity : AppCompatActivity() {
|
|||||||
val products = viewModel.otherProducts.value.orEmpty()
|
val products = viewModel.otherProducts.value.orEmpty()
|
||||||
if (products.isNotEmpty()) {
|
if (products.isNotEmpty()) {
|
||||||
updateProducts(products, storeMap)
|
updateProducts(products, storeMap)
|
||||||
|
} else {
|
||||||
|
binding.progressBarDetailProdItem.visibility = View.VISIBLE
|
||||||
|
binding.rvProducts.visibility = View.GONE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -146,7 +152,7 @@ class StoreDetailActivity : AppCompatActivity() {
|
|||||||
.into(binding.ivStoreImage)
|
.into(binding.ivStoreImage)
|
||||||
|
|
||||||
val ratingStr = it.storeRating
|
val ratingStr = it.storeRating
|
||||||
val ratingValue = ratingStr?.toFloatOrNull()
|
val ratingValue = ratingStr.toFloatOrNull()
|
||||||
|
|
||||||
if (ratingValue != null && ratingValue > 0f) {
|
if (ratingValue != null && ratingValue > 0f) {
|
||||||
binding.tvStoreRating.text = String.format("%.1f", ratingValue)
|
binding.tvStoreRating.text = String.format("%.1f", ratingValue)
|
||||||
@ -161,10 +167,12 @@ class StoreDetailActivity : AppCompatActivity() {
|
|||||||
private fun updateProducts(products: List<ProductsItem>, storeMap: Map<Int, StoreItem>) {
|
private fun updateProducts(products: List<ProductsItem>, storeMap: Map<Int, StoreItem>) {
|
||||||
if (products.isEmpty()) {
|
if (products.isEmpty()) {
|
||||||
binding.rvProducts.visibility = View.GONE
|
binding.rvProducts.visibility = View.GONE
|
||||||
|
binding.progressBarDetailProdItem.visibility = View.VISIBLE
|
||||||
Log.d("StoreDetailActivity", "Product list is empty, hiding RecyclerView")
|
Log.d("StoreDetailActivity", "Product list is empty, hiding RecyclerView")
|
||||||
} else {
|
} else {
|
||||||
Log.d("StoreDetailActivity", "Displaying product list in RecyclerView")
|
Log.d("StoreDetailActivity", "Displaying product list in RecyclerView")
|
||||||
|
|
||||||
|
binding.progressBarDetailProdItem.visibility = View.GONE
|
||||||
binding.rvProducts.visibility = View.VISIBLE
|
binding.rvProducts.visibility = View.VISIBLE
|
||||||
productAdapter = HorizontalProductAdapter(products, onClick = { product ->
|
productAdapter = HorizontalProductAdapter(products, onClick = { product ->
|
||||||
handleProductClick(product)
|
handleProductClick(product)
|
||||||
|
|||||||
5
app/src/main/res/drawable/baseline_circle_24.xml
Normal file
5
app/src/main/res/drawable/baseline_circle_24.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#489EC6" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
|
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.47,2 2,6.47 2,12s4.47,10 10,10 10,-4.47 10,-10S17.53,2 12,2z"/>
|
||||||
|
|
||||||
|
</vector>
|
||||||
@ -231,6 +231,18 @@
|
|||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/empty_review"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Belum ada ulasan"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@color/black_200"
|
||||||
|
android:gravity="center"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:fontFamily="@font/dmsans_mediumitalic"
|
||||||
|
android:layout_marginTop="8dp"/>
|
||||||
|
|
||||||
<!-- RecyclerView for Reviews -->
|
<!-- RecyclerView for Reviews -->
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/recyclerViewReviews"
|
android:id="@+id/recyclerViewReviews"
|
||||||
@ -385,6 +397,13 @@
|
|||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:padding="16dp">
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/progress_bar_detail_store"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:layout_gravity="center"/>
|
||||||
|
|
||||||
<de.hdodenhof.circleimageview.CircleImageView
|
<de.hdodenhof.circleimageview.CircleImageView
|
||||||
android:id="@+id/ivSellerImage"
|
android:id="@+id/ivSellerImage"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
@ -477,6 +496,18 @@
|
|||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/empty_other_products"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Belum ada ulasan"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@color/black_200"
|
||||||
|
android:gravity="center"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:fontFamily="@font/dmsans_mediumitalic"
|
||||||
|
android:layout_marginTop="8dp"/>
|
||||||
|
|
||||||
<!-- RecyclerView for Other Products -->
|
<!-- RecyclerView for Other Products -->
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/recyclerViewOtherProducts"
|
android:id="@+id/recyclerViewOtherProducts"
|
||||||
|
|||||||
@ -15,61 +15,93 @@
|
|||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<!-- Store Information -->
|
<!-- Store Information Card -->
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:id="@+id/storeInfoCard"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
app:cardBackgroundColor="@android:color/white"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardElevation="4dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/searchContainer">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/storeInfoContainer"
|
android:id="@+id/storeInfoContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/blue_50"
|
android:padding="24dp">
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:padding="24dp"
|
<!-- Store Image with Material Card wrapper -->
|
||||||
app:layout_constraintTop_toBottomOf="@id/searchContainer">
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:id="@+id/storeImageCard"
|
||||||
|
android:layout_width="80dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardElevation="2dp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/ivStoreImage"
|
android:id="@+id/ivStoreImage"
|
||||||
android:layout_width="64dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="64dp"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/circle_background"
|
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:src="@drawable/placeholder_image" />
|
tools:src="@drawable/placeholder_image" />
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
<!-- Store Name -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvStoreName"
|
android:id="@+id/tvStoreName"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="20dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="2"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textSize="18sp"
|
android:textSize="20sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/ivStoreImage"
|
app:layout_constraintStart_toEndOf="@id/storeImageCard"
|
||||||
app:layout_constraintTop_toTopOf="@id/ivStoreImage"
|
app:layout_constraintTop_toTopOf="@id/storeImageCard"
|
||||||
tools:text="SnackEnak" />
|
tools:text="SnackEnak Store" />
|
||||||
|
|
||||||
|
<!-- Store Type -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvStoreType"
|
android:id="@+id/tvStoreType"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="20dp"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:textSize="14sp"
|
android:background="@drawable/search_background"
|
||||||
|
android:paddingStart="12dp"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
android:paddingEnd="12dp"
|
||||||
|
android:paddingBottom="4dp"
|
||||||
|
android:textColor="@color/blue_500"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textStyle="bold"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/ivStoreImage"
|
app:layout_constraintStart_toEndOf="@id/storeImageCard"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvStoreName"
|
app:layout_constraintTop_toBottomOf="@id/tvStoreName"
|
||||||
tools:text="Makanan Ringan" />
|
tools:text="Makanan Ringan" />
|
||||||
|
|
||||||
|
<!-- Rating Container -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/storeRatingContainer"
|
android:id="@+id/storeRatingContainer"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="20dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="8dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintStart_toEndOf="@id/ivStoreImage"
|
app:layout_constraintStart_toEndOf="@id/storeImageCard"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvStoreType">
|
app:layout_constraintTop_toBottomOf="@id/tvStoreType">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@ -84,87 +116,106 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
android:textSize="12sp"
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="14sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:text="5.0" />
|
tools:text="4.8" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Location and Status Row -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/locationStatusContainer"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/storeImageCard"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/storeRatingContainer">
|
||||||
|
|
||||||
|
<!-- Location with Icon -->
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="14dp"
|
||||||
|
android:layout_height="14dp"
|
||||||
|
android:src="@drawable/ic_location"
|
||||||
|
app:tint="@color/black_300" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvStoreLocation"
|
android:id="@+id/tvStoreLocation"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="4dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_weight="1"
|
||||||
android:layout_marginEnd="16dp"
|
android:ellipsize="end"
|
||||||
android:textSize="12sp"
|
android:maxLines="1"
|
||||||
app:layout_constraintEnd_toStartOf="@id/tvActiveStatus"
|
android:textColor="@color/blue_400"
|
||||||
app:layout_constraintStart_toEndOf="@id/ivStoreImage"
|
android:textSize="13sp"
|
||||||
app:layout_constraintTop_toBottomOf="@id/storeRatingContainer"
|
|
||||||
tools:text="Kabupaten Serang" />
|
tools:text="Kabupaten Serang" />
|
||||||
|
|
||||||
|
<!-- Status Indicator -->
|
||||||
|
<View
|
||||||
|
android:id="@+id/statusDot"
|
||||||
|
android:layout_width="6dp"
|
||||||
|
android:layout_height="6dp"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginEnd="6dp"
|
||||||
|
android:background="@drawable/baseline_circle_24"
|
||||||
|
android:backgroundTint="@color/black_300"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvActiveStatus"
|
android:id="@+id/tvActiveStatus"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingStart="4dp"
|
android:textColor="@color/blue_500"
|
||||||
android:paddingEnd="4dp"
|
|
||||||
android:text="Aktif"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/tvStoreLocation"
|
android:fontFamily="@font/dmsans_semibold"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
tools:text="Aktif" />
|
||||||
app:layout_constraintTop_toTopOf="@id/tvStoreLocation" />
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- <ImageButton-->
|
|
||||||
<!-- android:id="@+id/btnChevron"-->
|
|
||||||
<!-- android:layout_width="wrap_content"-->
|
|
||||||
<!-- android:layout_height="wrap_content"-->
|
|
||||||
<!-- android:background="?attr/selectableItemBackgroundBorderless"-->
|
|
||||||
<!-- android:contentDescription="More"-->
|
|
||||||
<!-- android:src="@drawable/ic_chevron_right"-->
|
|
||||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
|
||||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
|
||||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
<!-- Divider -->
|
||||||
<com.google.android.material.divider.MaterialDivider
|
<com.google.android.material.divider.MaterialDivider
|
||||||
android:id="@+id/divider_product"
|
android:id="@+id/divider_product"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintTop_toBottomOf="@id/storeInfoContainer"/>
|
android:layout_marginTop="24dp"
|
||||||
|
app:dividerColor="@color/black_200"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/storeInfoCard" />
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
<!-- Tab Layout: TO DO implement after review -->
|
android:id="@+id/progress_bar_detail_prod_item"
|
||||||
<!-- <com.google.android.material.tabs.TabLayout-->
|
android:layout_width="wrap_content"
|
||||||
<!-- android:id="@+id/tabLayout"-->
|
android:layout_height="wrap_content"
|
||||||
<!-- android:layout_width="match_parent"-->
|
android:visibility="gone"
|
||||||
<!-- android:layout_height="wrap_content"-->
|
android:layout_gravity="center"
|
||||||
<!-- app:layout_constraintTop_toBottomOf="@id/storeInfoContainer"-->
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
<!-- app:tabIndicatorColor="@color/colorPrimary"-->
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
<!-- app:tabSelectedTextColor="@color/colorPrimary"-->
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
<!-- app:tabTextColor="@android:color/darker_gray">-->
|
app:layout_constraintTop_toBottomOf="@id/divider_product"/>
|
||||||
|
|
||||||
<!-- <com.google.android.material.tabs.TabItem-->
|
|
||||||
<!-- android:layout_width="wrap_content"-->
|
|
||||||
<!-- android:layout_height="wrap_content"-->
|
|
||||||
<!-- android:text="Produk" />-->
|
|
||||||
|
|
||||||
<!-- <com.google.android.material.tabs.TabItem-->
|
|
||||||
<!-- android:layout_width="wrap_content"-->
|
|
||||||
<!-- android:layout_height="wrap_content"-->
|
|
||||||
<!-- android:text="Kategori" />-->
|
|
||||||
<!-- </com.google.android.material.tabs.TabLayout>-->
|
|
||||||
|
|
||||||
<!-- Products RecyclerView -->
|
<!-- Products RecyclerView -->
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/rv_products"
|
android:id="@+id/rv_products"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:paddingBottom="16dp"
|
||||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/divider_product"
|
app:layout_constraintTop_toBottomOf="@id/divider_product"
|
||||||
app:spanCount="2"
|
app:spanCount="2"
|
||||||
tools:listitem="@layout/item_product_grid" />
|
tools:listitem="@layout/item_product_grid" />
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
Reference in New Issue
Block a user