added an emergency cancel button for touchscreens, when waiting to set a new hotkey
This commit is contained in:
parent
6139517d75
commit
3c4df07647
1 changed files with 5 additions and 2 deletions
|
|
@ -69,14 +69,17 @@ public class PreferenceHotkey extends ScreenPreference implements DialogInterfac
|
||||||
@Override
|
@Override
|
||||||
protected void onClick() {
|
protected void onClick() {
|
||||||
super.onClick();
|
super.onClick();
|
||||||
|
|
||||||
|
boolean enableCancelButton = !DeviceInfo.noTouchScreen(getContext());
|
||||||
|
|
||||||
UI.confirm(
|
UI.confirm(
|
||||||
getContext(),
|
getContext(),
|
||||||
getKey(),
|
getKey(),
|
||||||
getContext().getString(R.string.function_assign_instructions, getTitle()),
|
getContext().getString(R.string.function_assign_instructions, getTitle()),
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
false,
|
enableCancelButton,
|
||||||
null,
|
enableCancelButton ? ()->{} : null,
|
||||||
this
|
this
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue