mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-24 01:06:39 +00:00
Toggle the IME with a 3 finger tap rather than only showing it
This commit is contained in:
@@ -1231,10 +1231,10 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void showKeyboard() {
|
public void toggleKeyboard() {
|
||||||
LimeLog.info("Showing keyboard overlay");
|
LimeLog.info("Toggling keyboard overlay");
|
||||||
InputMethodManager inputManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
|
InputMethodManager inputManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
inputManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY);
|
inputManager.toggleSoftInput(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns true if the event was consumed
|
// Returns true if the event was consumed
|
||||||
@@ -1471,7 +1471,7 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
// All fingers up
|
// All fingers up
|
||||||
if (SystemClock.uptimeMillis() - threeFingerDownTime < THREE_FINGER_TAP_THRESHOLD) {
|
if (SystemClock.uptimeMillis() - threeFingerDownTime < THREE_FINGER_TAP_THRESHOLD) {
|
||||||
// This is a 3 finger tap to bring up the keyboard
|
// This is a 3 finger tap to bring up the keyboard
|
||||||
showKeyboard();
|
toggleKeyboard();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
package com.limelight.ui;
|
package com.limelight.ui;
|
||||||
|
|
||||||
public interface GameGestures {
|
public interface GameGestures {
|
||||||
void showKeyboard();
|
void toggleKeyboard();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user