Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MasoudFallahpour/b9c440444744854dbbf529c47533666c to your computer and use it in GitHub Desktop.
Save MasoudFallahpour/b9c440444744854dbbf529c47533666c to your computer and use it in GitHub Desktop.
Setting a custom shape for BottomNavigationView
val radius = resources.getDimension(R.dimen.radius_small)
val bottomNavigationViewBackground = bottomNavigationView.background as MaterialShapeDrawable
bottomNavigationViewBackground.shapeAppearanceModel =
bottomNavigationViewBackground.shapeAppearanceModel.toBuilder()
.setTopRightCorner(CornerFamily.ROUNDED, radius)
.setTopLeftCorner(CornerFamily.ROUNDED, radius)
.build()
@nitesh-singh-1307
Copy link

great

@nitesh-singh-1307
Copy link

are you use telegram , stackoverflow , like are you join in android group . share me. i have you friend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment