[Control button] Bug fix: toggle color not shown

This commit is contained in:
Duy Tran Khanh 2021-01-07 15:24:07 +07:00
parent 9fe8eaeba6
commit dc6be7077e

View File

@ -201,6 +201,7 @@ public class ControlButton extends Button implements OnLongClickListener, OnTouc
MainActivity.sendKeyPress(mProperties.keycode, CallbackBridge.getCurrentMods(), isDown);
} else if (mGestureDetector.onTouchEvent(event)) {
mChecked = !mChecked;
invalidate();
setHolding(mChecked);
MainActivity.sendKeyPress(mProperties.keycode, CallbackBridge.getCurrentMods(), mChecked);
}