This commit is contained in:
Victor Shcherb 2021-02-08 12:43:31 +01:00
parent 0bf7a587af
commit 23ff6a54cf
3 changed files with 12 additions and 9 deletions

View file

@ -57,9 +57,6 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra
private LinearLayout itemsContainer;
private LinearLayout buttonsContainer;
@StringRes
protected int dismissButtonStringRes = R.string.shared_string_cancel;
public void setUsedOnMap(boolean usedOnMap) {
this.usedOnMap = usedOnMap;
}
@ -261,11 +258,7 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra
@StringRes
protected int getDismissButtonTextId() {
return dismissButtonStringRes;
}
protected void setDismissButtonTextId(@StringRes int stringRes) {
dismissButtonStringRes = stringRes;
return R.string.shared_string_cancel;
}
protected int getDismissButtonHeight(){

View file

@ -143,6 +143,12 @@ public class SaveGPXBottomSheetFragment extends MenuBottomSheetDialogFragment {
return UiUtilities.DialogButtonType.SECONDARY;
}
@Override
protected int getDismissButtonTextId() {
return R.string.shared_string_close;
}
@Override
protected int getRightBottomButtonTextId() {
return R.string.shared_string_open_track;

View file

@ -27,10 +27,14 @@ public abstract class AppModesBottomSheetDialogFragment<T extends AbstractProfil
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setDismissButtonTextId(R.string.shared_string_close);
getData();
}
@Override
protected int getDismissButtonTextId() {
return R.string.shared_string_close;
}
@Override
public void onDismiss(DialogInterface dialog) {
super.onDismiss(dialog);