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
Window: directly attach the decorView
This commit is contained in:
@@ -175,7 +175,6 @@ public class Activity extends ContextThemeWrapper implements Window.Callback {
|
|||||||
if (window.contentView != null)
|
if (window.contentView != null)
|
||||||
window.setContentView(window.contentView);
|
window.setContentView(window.contentView);
|
||||||
window.setTitle(title);
|
window.setTitle(title);
|
||||||
window.attached();
|
|
||||||
|
|
||||||
for (Fragment fragment : fragments) {
|
for (Fragment fragment : fragments) {
|
||||||
fragment.onStart();
|
fragment.onStart();
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ public class Window {
|
|||||||
this.context = context;
|
this.context = context;
|
||||||
decorView = new FrameLayout(context);
|
decorView = new FrameLayout(context);
|
||||||
decorView.setId(android.R.id.content);
|
decorView.setId(android.R.id.content);
|
||||||
|
decorView.onAttachedToWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addFlags(int flags) {}
|
public void addFlags(int flags) {}
|
||||||
@@ -58,11 +59,6 @@ public class Window {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void attached() {
|
|
||||||
if (decorView != null)
|
|
||||||
decorView.onAttachedToWindow();
|
|
||||||
}
|
|
||||||
|
|
||||||
public View getDecorView() {
|
public View getDecorView() {
|
||||||
return decorView;
|
return decorView;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user