Hello all. Wondering if anyone has tried and had ...
# compose
b
Hello all. Wondering if anyone has tried and had success using a BadgeBox on a Navbar button? My badge overflows off the side of the navbar. Code and screenshot in comments.
message has been deleted
Copy code
TopAppBar(
      title = {
         Text(
            text = "Test"
         )
      },
      navigationIcon = {
         IconButton(onClick = { } ) {
            Icon(<http://Icons.Default.Menu|Icons.Default.Menu>, contentDescription = "Navigation")
         }
      },
      actions = {
         BadgedBox(
            badge = { Badge { Text("8") } }
         ) {
            IconButton(onClick = { } ) {
               Icon(Icons.Default.FilterList, contentDescription = "")
            }
         }
      }
   )
y
🤔 interesting question …. Did you try change position of badge? aka
Copy code
Modifier.offset(x = (-12).dp, y = (-4).dp)
or just siple add padding to end …
first is your code and secon one is my with code
Copy code
actions = {
IconButton(modifier = Modifier.padding(end = 16.dp),
onClick = {}......