You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
View: implement onKeyDown() callback
This commit is contained in:
@@ -2108,7 +2108,16 @@ public class View implements Drawable.Callback {
|
||||
|
||||
public boolean requestRectangleOnScreen(Rect rectangle) {return false;}
|
||||
|
||||
public boolean dispatchKeyEvent(KeyEvent event) {return false;}
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN)
|
||||
return onKeyDown(event.getKeyCode(), event);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public WindowInsets getRootWindowInsets() {return null;}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user