Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change android jetpack compose bottomAppBar icon tint color?

BottomNavigationBar() can only take the background and contentColor but there is no option for tint color.

like image 437
Smmy Sa Avatar asked Feb 15 '21 16:02

Smmy Sa


People also ask

How do I change the color of my status bar in compose?

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+.

What is recomposition in jetpack compose?

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.

Does jetpack compose increase app size?

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.

What is view model in jetpack compose?

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.


1 Answers

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)
)
like image 107
Mohit Suthar Avatar answered Nov 08 '22 23:11

Mohit Suthar