package org.michaelbel.sample;

import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.annotation.StyleRes;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

import org.michaelbel.bottomsheet.BottomSheet;

import butterknife.BindView;
import butterknife.ButterKnife;

@SuppressWarnings("all")
public class SecondActivity extends AppCompatActivity implements View.OnClickListener {

    private boolean theme;

    private int[] items1 = new int[] {
        R.string.share,
        R.string.upload,
        R.string.copy,
        R.string.print_this_page
    };

    private int[] items2 = new int[] {
        R.string.preview,
        R.string.share,
        R.string.get_link,
        R.string.make_copy
    };

    private int[] icons = new int[] {
        R.drawable.ic_share,
        R.drawable.ic_upload,
        R.drawable.ic_copy,
        R.drawable.ic_printer
    };

    @BindView(R.id.button)
    public Button button;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_second);
        ButterKnife.bind(this);

        Toolbar toolbar = findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        SharedPreferences prefs = getSharedPreferences("mainconfig", MODE_PRIVATE);
        theme = prefs.getBoolean("theme", true);

        button.setOnClickListener(this);
        button.setText("Show dialog");
    }

    @Override
    public void setTheme(@StyleRes int resid) {
        SharedPreferences prefs = getSharedPreferences("mainconfig", MODE_PRIVATE);
        boolean appTheme = prefs.getBoolean("theme", true);
        super.setTheme(appTheme ? R.style.AppThemeLight : R.style.AppThemeDark);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        menu.add(R.string.ChangeTheme)
            .setIcon(R.drawable.ic_theme)
            .setShowAsActionFlags(MenuItem.SHOW_AS_ACTION_IF_ROOM)
            .setOnMenuItemClickListener(menuItem -> {
                SharedPreferences prefs = getSharedPreferences("mainconfig", MODE_PRIVATE);
                SharedPreferences.Editor editor = prefs.edit();
                boolean appTheme = prefs.getBoolean("theme", true);
                editor.putBoolean("theme", !appTheme);
                editor.apply();
                recreate();
                return true;
            });

        return super.onCreateOptionsMenu(menu);
    }

    @Override
    public void onClick(View v) {
        BottomSheet.Builder builder = new BottomSheet.Builder(this);
        builder.setDarkTheme(!theme);
        //builder.setWindowDimming(dimmingSeekBar.getProgress());
        builder.setDividers(true);
        //builder.setFullWidth(fullWidthCheckBox.isChecked());
        //builder.setCellHeight(Utils.dp(this, heightSeekBar.getProgress() + 48));
        /*builder.setCallback(!callbackCheckBox.isChecked() ? null : new BottomSheetCallback() {
            @Override
            public void onShown() {
                showToast(R.string.Shown);
            }

            @Override
            public void onDismissed() {
                showToast(R.string.Dismissed);
            }
        });*/
        builder.setTitle(R.string.Actions);
        //builder.setTitleMultiline(multilineCheckBox.isChecked());
        builder.setMenu(R.menu.menu_items_icons, new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                Toast.makeText(SecondActivity.this, "Item: " + which, Toast.LENGTH_SHORT).show();
            }
        });
        builder.show();
    }
}
@@ -1117,18 +1117,16 @@
 ic_print
-er
 %0A    %7D;%0A
@@ -2861,706 +2861,76 @@
     
-//builder.setWindowDimming(dimmingSeekBar.getProgress());%0A        builder.setDividers(true);%0A        //builder.setFullWidth(fullWidthCheckBox.isChecked());%0A        //builder.setCellHeight(Utils.dp(this, heightSeekBar.getProgress() + 48));%0A        /*builder.setCallback(!callbackCheckBox.isChecked() ? null : new BottomSheetCallback() %7B%0A            @Override%0A            public void onShown() %7B%0A                showToast(R.string.Shown);%0A            %7D%0A%0A            @Override%0A            public void onDismissed() %7B%0A                showToast(R.string.Dismissed);%0A            %7D%0A        %7D);*/%0A        builder.setTitle(R.string.Actions);%0A        //builder.setTitleMultiline(multilineCheckBox.isChecked()
+builder.setDividers(true);%0A        builder.setTitle(R.string.Actions
 );%0A 

Update demo app