Window: directly attach the decorView

This commit is contained in:
Julian Winkler
2024-12-02 22:03:26 +01:00
parent 036b5510d3
commit c4d20b828e
2 changed files with 1 additions and 6 deletions

View File

@@ -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();

View File

@@ -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;
} }