The icons in Jetpack Compose's Topbar can be removed by not specifying any icon
parameter in the TopAppBar
function. Here is an example:
import androidx.compose.material.*
import androidx.compose.runtime.*
@Composable
fun MyTopBar(title: String) {
TopAppBar(
title = { Text(text = title) },
backgroundColor = MaterialTheme.colors.primary,
elevation = 0.dp,
navigationIcon = null, // No icon specified
actions = {}
)
}
In this example, the navigationIcon
parameter is set to null indicating that the icon should not be displayed.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-03-13 11:00:00 +0000
Seen: 18 times
Last updated: Jan 31 '22
What is the cause of port conflict when scaling docker compose services?
What is the method to wait for the following @Composable function in Jetpack Compose testing?
What is the implementation of Jetpack Compose's nested LazyColumn/LazyRow?
How can the application be deployed on AWS Elastic Beanstalk using docker compose up?
How to change the background color of a button in Jetpack Compose?