diff --git a/doc/examples.html b/doc/examples.html index 9d50441..4457e86 100644 --- a/doc/examples.html +++ b/doc/examples.html @@ -59,6 +59,17 @@

Using the dark theme

By default the bottom sheet uses a light theme, which can be referenced by using the resource id R.style.BottomSheet_Light. If a dark theme should be used instead, the resource id R.style.BottomSheet has to be passed to the builder's constructor like shown below.

BottomSheet.Builder builder = new BottomSheet.Builder(this, R.style.BottomSheet);
+ +
Alternatively, the default theme, which is used by all bottom sheets by default, can be changed globally by using the theme attribute bottomSheetTheme. The attribute has to be included in the app's theme, which is defined in the res/values/styles.xml file, like it is shown below:
+ +
<resources> +

    <style name="AppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar"> +
        <item name="colorPrimary">@color/color_primary</item> +
        <item name="colorPrimaryDark">@color/color_primary_dark</item> +
        <item name="colorAccent">@color/color_accent</item> +
        <item name="bottomSheetTheme">@style/BottomSheet</item> +
    </style> +

</resources>