1
0
Fork 0

added an emergency cancel button for touchscreens, when waiting to set a new hotkey

This commit is contained in:
sspanak 2025-03-08 10:31:59 +02:00 committed by Dimo Karaivanov
parent 6139517d75
commit 3c4df07647

View file

@ -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
); );
} }