I just want to get the bottom sheet dialog like below_: margin from the system window. How can I get like this?
Add Dependency
implementation 'com.baoyz.actionsheet:library:1.1.7'
Add this code in Activity
public void ButtonActionSheet() {
ActionSheet.createBuilder(this, getSupportFragmentManager())
.setCancelButtonTitle("Cancel")
.setOtherButtonTitles("item1", "item2")
.setCancelableOnTouchOutside(true)
.setListener(new ActionSheet.ActionSheetListener() {
@Override
public void onDismiss(ActionSheet actionSheet, boolean isCancel) {
}
@Override
public void onOtherButtonClick(ActionSheet actionSheet, int index) {
if (index == 0) {
myMethod();
} else if (index == 1) {
myMethod2();
}
}
})
.show();
}
Add this line in style.xml
- @style/ActionSheetStyleiOS7