Skip to content

Commit 782097f

Browse files
committed
placeholder
1 parent 71282fa commit 782097f

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

app/src/main/java/com/hoc081098/firestore_coroutinesflow/ui/main/CategoryAdapter.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import androidx.recyclerview.widget.ListAdapter
77
import androidx.recyclerview.widget.RecyclerView
88
import com.bumptech.glide.load.engine.DiskCacheStrategy
99
import com.hoc081098.firestore_coroutinesflow.GlideRequests
10+
import com.hoc081098.firestore_coroutinesflow.R
1011
import com.hoc081098.firestore_coroutinesflow.databinding.CategoryItemBinding
1112
import com.hoc081098.firestore_coroutinesflow.domain.entity.Category
1213

@@ -40,6 +41,8 @@ class CategoryAdapter(
4041
.load(item.imageUrl)
4142
.diskCacheStrategy(DiskCacheStrategy.ALL)
4243
.centerCrop()
44+
.placeholder(R.drawable.icons8_full_image_80)
45+
.error(R.drawable.icons8_full_image_80)
4346
.into(binding.imageView)
4447
binding.textView.text = item.name
4548
}
1.38 KB
Loading

app/src/main/res/layout/category_item.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
android:maxLines="1"
3636
android:padding="12dp"
3737
android:textColor="@android:color/white"
38+
android:textSize="16sp"
3839
app:layout_constraintBottom_toBottomOf="parent"
3940
app:layout_constraintEnd_toEndOf="parent"
4041
app:layout_constraintHorizontal_bias="0.5"

0 commit comments

Comments
 (0)