Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/wild-rings-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-native-bottom-tabs": patch
---

fix: low resolution svgs on Android
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ import coil3.ImageLoader
import coil3.asDrawable
import coil3.request.ImageRequest
import coil3.svg.SvgDecoder
import coil3.size.Precision
import coil3.size.Size as CoilSize
import coil3.size.Scale
import com.facebook.react.bridge.ReadableArray
import com.facebook.react.common.assets.ReactFontManager
import com.facebook.react.modules.core.ReactChoreographer
Expand Down Expand Up @@ -336,8 +339,12 @@ class ReactBottomNavigationView(context: Context) : LinearLayout(context) {
onDrawableReady(it)
return
}
val iconSizePx = bottomNavigation.itemIconSize
val request = ImageRequest.Builder(context)
.data(imageSource.getUri(context))
.size(CoilSize(iconSizePx, iconSizePx))
.scale(Scale.FILL)
.precision(Precision.EXACT)
.target { drawable ->
post {
val stateDrawable = drawable.asDrawable(context.resources)
Expand Down
Loading