BottomNavigationBar() can only take the background
and contentColor
but there is no option for tint color.
Use the setNavigationBarColor() method to change the navigation bar color. We can change the color of both using the setSystemBarsColor() method. Note: Android supports dark icons for the status bar on API 23+ and navigation bar color on API 26+.
Recomposition is when Jetpack Compose re-executes the composables that may have changed in response to state changes, and then updates the Composition to reflect any changes. A Composition can only be produced by an initial composition and updated by recomposition.
Let's see how Compose affects the size of the projects mentioned above. The following results are for the minified release APK of each project with resource and code shrinking enabled, using R8 full mode, and measured using APK Analyzer. Tivi saw a 46% reduction in APK size, from 4.49 MB to 2.39 MB.
ViewModel in Jetpack Compose It means ViewModel follows the Activity's lifecycle and data can be maintained continuously even when the screen rotates. So let's look into how the ViewModel be used in composable functions.
If you want to change the tint color of the image then you can use the colorFilter
property of the Image
Image(
painter = painterResource(R.drawable.ic_arrow_details),
contentDescription = "",
colorFilter = ColorFilter.tint(Color.Black)
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With