A simple library that creates BottomSheets according to the Material Design
- 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);
}
}