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
protected void onClick() {
super.onClick();
boolean enableCancelButton = !DeviceInfo.noTouchScreen(getContext());
UI.confirm(
getContext(),
getKey(),
getContext().getString(R.string.function_assign_instructions, getTitle()),
null,
null,
false,
null,
enableCancelButton,
enableCancelButton ? ()->{} : null,
this
);
}