Skip to content

jackhau/Anroid-BottomSheetDialog

Repository files navigation

Bottom Sheet Dialog Example

A simple library that creates BottomSheets according to the Material Design

Screenshots

1213 1213

  • Add the following to your build.gradle:
dependencies {
  compile 'com.android.support:design:25.3.1'
  compile 'com.android.support:appcompat-v7:25.3.1'
}
  • Create a BottomSheetMenuDialog:
    ButtomDialog buttomDialog = new ButtomDialog(MainActivity.this);
    buttomDialog.show();
public class ButtomDialog extends BottomSheetDialog {

    public ButtomDialog(@NonNull Context context) {
        super(context);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getLayoutInflater().inflate(R.layout.dialog_layout, null));
        getWindow().setLayout(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
    }
}

About

Android-BottomSheetDialog

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages