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
findViewById(): only search among child views
also set default content view in Window
This commit is contained in:
@@ -28,6 +28,8 @@ public class Window {
|
||||
|
||||
public Window(Window.Callback callback) {
|
||||
this.callback = callback;
|
||||
contentView = new ViewGroup(Context.this_application);
|
||||
contentView.setId(android.R.id.content);
|
||||
}
|
||||
|
||||
public void addFlags(int flags) {}
|
||||
@@ -66,7 +68,10 @@ public class Window {
|
||||
}
|
||||
|
||||
public View findViewById(int id) {
|
||||
return View.view_by_id.get(id);
|
||||
if (contentView != null)
|
||||
return contentView.findViewById(id);
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
public View peekDecorView() {
|
||||
|
||||
Reference in New Issue
Block a user