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 requestFocus() and isFocused()
This commit is contained in:
@@ -1128,8 +1128,10 @@ public class View implements Drawable.Callback {
|
||||
return requestFocus(direction, null);
|
||||
}
|
||||
public boolean requestFocus(int direction, Rect previouslyFocusedRect) {
|
||||
nativeRequestFocus(widget, direction);
|
||||
return true;
|
||||
}
|
||||
private native void nativeRequestFocus(long widget, int direction);
|
||||
|
||||
private native void nativeSetFullscreen(long widget, boolean fullscreen);
|
||||
|
||||
@@ -1596,7 +1598,10 @@ public class View implements Drawable.Callback {
|
||||
public boolean isLayoutRequested() {return layoutRequested;}
|
||||
public int getBaseline() {return -1;}
|
||||
public boolean hasFocusable() {return false;}
|
||||
public boolean isFocused() {return false;}
|
||||
private static native boolean nativeIsFocused(long widget);
|
||||
public boolean isFocused() {
|
||||
return nativeIsFocused(widget);
|
||||
}
|
||||
|
||||
public void clearAnimation() {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user