Home > OS >  Round corners for Dropdown menu compose android
Round corners for Dropdown menu compose android

Time:07-27

Before, I posted here, I Googled a lot. I found the following: MaterialTheme(shapes = MaterialTheme.shapes.copy(medium = RoundedCornerShape(16.dp))){} from the following SO post: enter image description here

There certainly is some border radius, it isn't achieving the desired goal. The second screenshot from a third-party app, does have the border radius I am trying to get.

enter image description here

CodePudding user response:

With material3 the default shape used by the DropdownMenu is defined by the extraSmall attribute in the shapes

You have to use:

MaterialTheme.shapes.copy(extraSmall = RoundedCornerShape(xx.dp))) {

    //... DropdownMenu()

}

enter image description here

  • Related