mirror of
https://github.com/shaulascr/ecommerce_serang.git
synced 2025-08-10 09:22:21 +00:00
update display category list
This commit is contained in:

committed by
Gracia Hotmauli

parent
b37848e513
commit
28b0d5b082
@ -29,6 +29,9 @@
|
|||||||
android:theme="@style/Theme.Ecommerce_serang"
|
android:theme="@style/Theme.Ecommerce_serang"
|
||||||
android:usesCleartextTraffic="true"
|
android:usesCleartextTraffic="true"
|
||||||
tools:targetApi="31">
|
tools:targetApi="31">
|
||||||
|
<activity
|
||||||
|
android:name=".ui.product.listproduct.ListCategoryActivity"
|
||||||
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.product.listproduct.ListProductActivity"
|
android:name=".ui.product.listproduct.ListProductActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
@ -26,6 +26,7 @@ import com.alya.ecommerce_serang.ui.cart.CartActivity
|
|||||||
import com.alya.ecommerce_serang.ui.notif.NotificationActivity
|
import com.alya.ecommerce_serang.ui.notif.NotificationActivity
|
||||||
import com.alya.ecommerce_serang.ui.product.DetailProductActivity
|
import com.alya.ecommerce_serang.ui.product.DetailProductActivity
|
||||||
import com.alya.ecommerce_serang.ui.product.category.CategoryProductsActivity
|
import com.alya.ecommerce_serang.ui.product.category.CategoryProductsActivity
|
||||||
|
import com.alya.ecommerce_serang.ui.product.listproduct.ListCategoryActivity
|
||||||
import com.alya.ecommerce_serang.ui.product.listproduct.ListProductActivity
|
import com.alya.ecommerce_serang.ui.product.listproduct.ListProductActivity
|
||||||
import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
||||||
import com.alya.ecommerce_serang.utils.SessionManager
|
import com.alya.ecommerce_serang.utils.SessionManager
|
||||||
@ -100,6 +101,11 @@ class HomeFragment : Fragment() {
|
|||||||
val intent = Intent(requireContext(), ListProductActivity::class.java)
|
val intent = Intent(requireContext(), ListProductActivity::class.java)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.categoryShowAll.setOnClickListener {
|
||||||
|
val intent = Intent(requireContext(), ListCategoryActivity::class.java)
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupSearchView() {
|
private fun setupSearchView() {
|
||||||
|
@ -326,10 +326,10 @@ class CheckoutActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Voucher section (if implemented)
|
// // Voucher section (if implemented)
|
||||||
binding.layoutVoucher?.setOnClickListener {
|
// binding.layoutVoucher?.setOnClickListener {
|
||||||
Toast.makeText(this, "Voucher feature not implemented", Toast.LENGTH_SHORT).show()
|
// Toast.makeText(this, "Voucher feature not implemented", Toast.LENGTH_SHORT).show()
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
private val addressSelectionLauncher = registerForActivityResult(
|
private val addressSelectionLauncher = registerForActivityResult(
|
||||||
|
@ -360,6 +360,8 @@ class DetailProductActivity : AppCompatActivity() {
|
|||||||
val btnClose = view.findViewById<ImageButton>(R.id.btnCloseDialog)
|
val btnClose = view.findViewById<ImageButton>(R.id.btnCloseDialog)
|
||||||
|
|
||||||
val switchWholesale = view.findViewById<SwitchCompat>(R.id.switch_price)
|
val switchWholesale = view.findViewById<SwitchCompat>(R.id.switch_price)
|
||||||
|
val titleWholesale = view.findViewById<TextView>(R.id.tv_active_wholesale)
|
||||||
|
// val descWholesale = view.findViewById<TextView>(R.id.tv_desc_wholesale)
|
||||||
|
|
||||||
if (!isBuyNow) {
|
if (!isBuyNow) {
|
||||||
btnBuyNow.setText(R.string.add_to_cart)
|
btnBuyNow.setText(R.string.add_to_cart)
|
||||||
@ -368,10 +370,18 @@ class DetailProductActivity : AppCompatActivity() {
|
|||||||
switchWholesale.isEnabled = isWholesaleAvailable
|
switchWholesale.isEnabled = isWholesaleAvailable
|
||||||
switchWholesale.isChecked = isWholesaleSelected
|
switchWholesale.isChecked = isWholesaleSelected
|
||||||
|
|
||||||
// Set initial quantity based on current selection
|
|
||||||
currentQuantity = if (isWholesaleSelected) minOrder else 1
|
currentQuantity = if (isWholesaleSelected) minOrder else 1
|
||||||
tvQuantity.text = currentQuantity.toString()
|
tvQuantity.text = currentQuantity.toString()
|
||||||
|
|
||||||
|
if (isWholesaleAvailable){
|
||||||
|
switchWholesale.visibility = View.VISIBLE
|
||||||
|
Toast.makeText(this, "Minimal pembelian grosir $currentQuantity produk", Toast.LENGTH_SHORT).show()
|
||||||
|
} else {
|
||||||
|
switchWholesale.visibility = View.GONE
|
||||||
|
}
|
||||||
|
// Set initial quantity based on current selection
|
||||||
|
|
||||||
|
|
||||||
switchWholesale.setOnCheckedChangeListener { _, isChecked ->
|
switchWholesale.setOnCheckedChangeListener { _, isChecked ->
|
||||||
isWholesaleSelected = isChecked
|
isWholesaleSelected = isChecked
|
||||||
|
|
||||||
|
@ -0,0 +1,112 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.product.listproduct
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.util.Log
|
||||||
|
import android.view.View
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
import androidx.activity.viewModels
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.core.view.ViewCompat
|
||||||
|
import androidx.core.view.WindowCompat
|
||||||
|
import androidx.core.view.WindowInsetsCompat
|
||||||
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.alya.ecommerce_serang.data.api.dto.CategoryItem
|
||||||
|
import com.alya.ecommerce_serang.data.api.retrofit.ApiConfig
|
||||||
|
import com.alya.ecommerce_serang.data.repository.ProductRepository
|
||||||
|
import com.alya.ecommerce_serang.databinding.ActivityListCategoryBinding
|
||||||
|
import com.alya.ecommerce_serang.ui.product.category.CategoryProductsActivity
|
||||||
|
import com.alya.ecommerce_serang.utils.BaseViewModelFactory
|
||||||
|
import com.alya.ecommerce_serang.utils.SessionManager
|
||||||
|
import com.alya.ecommerce_serang.utils.viewmodel.HomeViewModel
|
||||||
|
|
||||||
|
class ListCategoryActivity : AppCompatActivity() {
|
||||||
|
companion object {
|
||||||
|
private val TAG = "ListCategoryActivity"
|
||||||
|
}
|
||||||
|
private lateinit var binding: ActivityListCategoryBinding
|
||||||
|
private lateinit var sessionManager: SessionManager
|
||||||
|
private var categoryAdapter: ListCategoryAdapter? = null
|
||||||
|
|
||||||
|
private val viewModel: HomeViewModel by viewModels {
|
||||||
|
BaseViewModelFactory {
|
||||||
|
val apiService = ApiConfig.getApiService(sessionManager)
|
||||||
|
val repository = ProductRepository(apiService)
|
||||||
|
HomeViewModel(repository)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = ActivityListCategoryBinding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
|
||||||
|
sessionManager = SessionManager(this)
|
||||||
|
|
||||||
|
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||||
|
enableEdgeToEdge()
|
||||||
|
|
||||||
|
ViewCompat.setOnApplyWindowInsetsListener(binding.root) { view, windowInsets ->
|
||||||
|
val systemBars = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||||
|
view.setPadding(
|
||||||
|
systemBars.left,
|
||||||
|
systemBars.top,
|
||||||
|
systemBars.right,
|
||||||
|
systemBars.bottom
|
||||||
|
)
|
||||||
|
windowInsets
|
||||||
|
}
|
||||||
|
|
||||||
|
setupToolbar()
|
||||||
|
setupObserver()
|
||||||
|
viewModel.loadCategory()
|
||||||
|
setupRecyclerView()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setupToolbar(){
|
||||||
|
binding.header.headerLeftIcon.setOnClickListener{
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
binding.header.headerTitle.text = "Kategori Produk"
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setupRecyclerView(){
|
||||||
|
categoryAdapter = ListCategoryAdapter(
|
||||||
|
categories = emptyList(),
|
||||||
|
onClick = { category -> handleClickOnCategory(category) }
|
||||||
|
)
|
||||||
|
|
||||||
|
binding.rvListCategories.apply {
|
||||||
|
adapter = categoryAdapter
|
||||||
|
layoutManager = GridLayoutManager(
|
||||||
|
context,
|
||||||
|
3, // 3 columns
|
||||||
|
RecyclerView.VERTICAL,
|
||||||
|
false
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setupObserver(){
|
||||||
|
viewModel.category.observe(this) { category ->
|
||||||
|
Log.d("ListCategoryActivity", "Received categories: ${category.size}")
|
||||||
|
updateCategories(category)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun updateCategories(category: List<CategoryItem>){
|
||||||
|
if (category.isEmpty()) {
|
||||||
|
binding.rvListCategories.visibility = View.GONE
|
||||||
|
} else {
|
||||||
|
binding.rvListCategories.visibility = View.VISIBLE
|
||||||
|
categoryAdapter?.updateData(category)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun handleClickOnCategory(category: CategoryItem){
|
||||||
|
val intent = Intent(this, CategoryProductsActivity::class.java)
|
||||||
|
intent.putExtra(CategoryProductsActivity.EXTRA_CATEGORY, category)
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
package com.alya.ecommerce_serang.ui.product.listproduct
|
||||||
|
|
||||||
|
import android.util.Log
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.alya.ecommerce_serang.BuildConfig.BASE_URL
|
||||||
|
import com.alya.ecommerce_serang.R
|
||||||
|
import com.alya.ecommerce_serang.data.api.dto.CategoryItem
|
||||||
|
import com.alya.ecommerce_serang.databinding.ItemCategoryHomeBinding
|
||||||
|
import com.bumptech.glide.Glide
|
||||||
|
|
||||||
|
class ListCategoryAdapter(
|
||||||
|
private var categories:List<CategoryItem>,
|
||||||
|
private val onClick:(category: CategoryItem) -> Unit
|
||||||
|
): RecyclerView.Adapter<ListCategoryAdapter.ViewHolder>() {
|
||||||
|
|
||||||
|
inner class ViewHolder(private val binding: ItemCategoryHomeBinding): RecyclerView.ViewHolder(binding.root){
|
||||||
|
fun bind(category: CategoryItem) = with(binding) {
|
||||||
|
Log.d("CategoriesAdapter", "Binding category: ${category.name}, Image: ${category.image}")
|
||||||
|
|
||||||
|
val fullImageUrl = if (category.image.startsWith("/")) {
|
||||||
|
BASE_URL + category.image.removePrefix("/") // Append base URL if the path starts with "/"
|
||||||
|
} else {
|
||||||
|
category.image // Use as is if it's already a full URL
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("CategoriesAdapter", "Loading image: $fullImageUrl")
|
||||||
|
|
||||||
|
Glide.with(itemView.context)
|
||||||
|
.load(fullImageUrl) // Ensure full URL
|
||||||
|
.placeholder(R.drawable.placeholder_image)
|
||||||
|
.into(imageCategory)
|
||||||
|
|
||||||
|
name.text = category.name
|
||||||
|
|
||||||
|
root.setOnClickListener { onClick(category) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = ViewHolder (
|
||||||
|
ItemCategoryHomeBinding.inflate(LayoutInflater.from(parent.context),parent,false)
|
||||||
|
)
|
||||||
|
|
||||||
|
override fun getItemCount() = categories.size
|
||||||
|
|
||||||
|
override fun onBindViewHolder(holder: ListCategoryAdapter.ViewHolder, position: Int) {
|
||||||
|
holder.bind(categories[position])
|
||||||
|
}
|
||||||
|
|
||||||
|
fun updateData(newCategories: List<CategoryItem>) {
|
||||||
|
categories = newCategories.toList()
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
}
|
@ -69,7 +69,7 @@ class ListProductActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
private fun setupRecyclerView() {
|
private fun setupRecyclerView() {
|
||||||
|
|
||||||
binding.rvProducts.apply {
|
binding.rvProductsList.apply {
|
||||||
adapter = productAdapter
|
adapter = productAdapter
|
||||||
layoutManager = GridLayoutManager(
|
layoutManager = GridLayoutManager(
|
||||||
context,
|
context,
|
||||||
@ -112,14 +112,14 @@ class ListProductActivity : 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()) {
|
||||||
Log.d(TAG, "Product list is empty, hiding RecyclerView")
|
Log.d(TAG, "Product list is empty, hiding RecyclerView")
|
||||||
binding.rvProducts.visibility = View.VISIBLE
|
binding.rvProductsList.visibility = View.VISIBLE
|
||||||
} else {
|
} else {
|
||||||
Log.d(TAG, "Displaying product list in RecyclerView")
|
Log.d(TAG, "Displaying product list in RecyclerView")
|
||||||
binding.rvProducts.visibility = View.VISIBLE // <-- Fix here
|
binding.rvProductsList.visibility = View.VISIBLE // <-- Fix here
|
||||||
productAdapter = ListProductAdapter(products, onClick = { product ->
|
productAdapter = ListProductAdapter(products, onClick = { product ->
|
||||||
handleProductClick(product)
|
handleProductClick(product)
|
||||||
}, storeMap = storeMap)
|
}, storeMap = storeMap)
|
||||||
binding.rvProducts.adapter = productAdapter
|
binding.rvProductsList.adapter = productAdapter
|
||||||
productAdapter?.updateProducts(products)
|
productAdapter?.updateProducts(products)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.alya.ecommerce_serang.utils.viewmodel
|
package com.alya.ecommerce_serang.utils.viewmodel
|
||||||
|
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
|
import androidx.lifecycle.LiveData
|
||||||
|
import androidx.lifecycle.MutableLiveData
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
import com.alya.ecommerce_serang.data.api.dto.CategoryItem
|
import com.alya.ecommerce_serang.data.api.dto.CategoryItem
|
||||||
@ -25,6 +27,9 @@ class HomeViewModel (
|
|||||||
private val _storeMap = MutableStateFlow<Map<Int, StoreItem>>(emptyMap())
|
private val _storeMap = MutableStateFlow<Map<Int, StoreItem>>(emptyMap())
|
||||||
val storeMap: StateFlow<Map<Int, StoreItem>> = _storeMap.asStateFlow()
|
val storeMap: StateFlow<Map<Int, StoreItem>> = _storeMap.asStateFlow()
|
||||||
|
|
||||||
|
private val _category = MutableLiveData<List<CategoryItem>>()
|
||||||
|
val category: LiveData<List<CategoryItem>> get() = _category
|
||||||
|
|
||||||
init {
|
init {
|
||||||
loadProducts()
|
loadProducts()
|
||||||
loadCategories()
|
loadCategories()
|
||||||
@ -73,6 +78,16 @@ class HomeViewModel (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun loadCategory() {
|
||||||
|
viewModelScope.launch {
|
||||||
|
when (val result = productRepository.getAllCategories()) {
|
||||||
|
is Result.Success -> _category.value = result.data
|
||||||
|
is Result.Error -> Log.e("HomeViewModel", "Failed to fetch categories", result.exception)
|
||||||
|
is Result.Loading -> {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
fun retry() {
|
fun retry() {
|
||||||
loadProducts()
|
loadProducts()
|
||||||
|
@ -142,35 +142,6 @@
|
|||||||
android:layout_height="8dp"
|
android:layout_height="8dp"
|
||||||
android:background="#F5F5F5" />
|
android:background="#F5F5F5" />
|
||||||
|
|
||||||
<!-- Voucher Section -->
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/layout_voucher"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:background="@color/white"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<!-- <ImageView-->
|
|
||||||
<!-- android:layout_width="24dp"-->
|
|
||||||
<!-- android:layout_height="24dp"-->
|
|
||||||
<!-- android:src="@drawable/ic_voucher_24" />-->
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Gunakan Voucher"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginStart="8dp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="24dp"
|
|
||||||
android:layout_height="24dp"
|
|
||||||
android:src="@drawable/ic_arrow_right" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="8dp"
|
android:layout_height="8dp"
|
||||||
|
28
app/src/main/res/layout/activity_list_category.xml
Normal file
28
app/src/main/res/layout/activity_list_category.xml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout 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=".ui.product.listproduct.ListCategoryActivity">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/header"
|
||||||
|
layout="@layout/header" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rvListCategories"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:paddingStart="8dp"
|
||||||
|
android:paddingEnd="8dp"
|
||||||
|
android:clipChildren="false"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/header"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
tools:listitem="@layout/item_category_home" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -8,12 +8,14 @@
|
|||||||
tools:context=".ui.product.listproduct.ListProductActivity">
|
tools:context=".ui.product.listproduct.ListProductActivity">
|
||||||
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/searchContainer"
|
android:id="@+id/searchContainerList"
|
||||||
layout="@layout/view_search_back"
|
layout="@layout/view_search_back"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/rvProductsList"/>
|
||||||
|
|
||||||
<!-- <com.google.android.material.divider.MaterialDivider-->
|
<!-- <com.google.android.material.divider.MaterialDivider-->
|
||||||
<!-- android:id="@+id/divider_product"-->
|
<!-- android:id="@+id/divider_product"-->
|
||||||
@ -23,11 +25,11 @@
|
|||||||
<!-- app:layout_constraintTop_toBottomOf="@id/searchContainer"/>-->
|
<!-- app:layout_constraintTop_toBottomOf="@id/searchContainer"/>-->
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/rvProducts"
|
android:id="@+id/rvProductsList"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingHorizontal="23dp"
|
android:paddingHorizontal="23dp"
|
||||||
app:layout_constraintTop_toBottomOf="@id/searchContainer"
|
app:layout_constraintTop_toBottomOf="@id/searchContainerList"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
app:spanCount="2"
|
app:spanCount="2"
|
||||||
|
@ -39,14 +39,15 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<TextView
|
<!-- <TextView-->
|
||||||
android:layout_width="match_parent"
|
<!-- android:id="@+id/tv_desc_wholesale"-->
|
||||||
android:layout_height="wrap_content"
|
<!-- android:layout_width="match_parent"-->
|
||||||
android:text="Minimal pembelian 10 buah untuk harga grosir"
|
<!-- android:layout_height="wrap_content"-->
|
||||||
android:fontFamily="@font/dmsans_mediumitalic"
|
<!-- android:text="Minimal pembelian 10 buah untuk harga grosir"-->
|
||||||
android:textSize="12sp"
|
<!-- android:fontFamily="@font/dmsans_mediumitalic"-->
|
||||||
android:textColor="@color/black_300"
|
<!-- android:textSize="12sp"-->
|
||||||
android:layout_marginBottom="8dp"/>
|
<!-- android:textColor="@color/black_300"-->
|
||||||
|
<!-- android:layout_marginBottom="8dp"/>-->
|
||||||
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/showAll"
|
android:id="@+id/categoryShowAll"
|
||||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
Reference in New Issue
Block a user