Skip to content

Instantly share code, notes, and snippets.

@labibmuhajir
Last active April 7, 2021 20:37
Show Gist options
  • Save labibmuhajir/5f376128ef620ba0db538a08e2fffa2a to your computer and use it in GitHub Desktop.
Save labibmuhajir/5f376128ef620ba0db538a08e2fffa2a to your computer and use it in GitHub Desktop.
Android Bottomsheet Rounded Top
<!-- android style -->
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="bottomSheetDialogTheme">@style/BottomSheetTheme</item>
</style>
<style name="BottomSheetTheme" parent="Theme.MaterialComponents.Light.BottomSheetDialog">
<item name="bottomSheetStyle">@style/BottomSheetModalStyle</item>
</style>
<style name="BottomSheetModalStyle" parent="Widget.Design.BottomSheet.Modal">
<item name="android:background">@drawable/top_corner_radius_background</item>
</style>
</resources>
<!-- drawable -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/cardview_light_background"/>
<corners
android:topLeftRadius="24dp"
android:topRightRadius="24dp"/>
</shape>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment