Window: implement getDecorView() properly

This is needed to fix the "ViewTreeLifecycleOwner not found" error in
composeUI.
This commit is contained in:
Julian Winkler
2024-11-27 15:00:25 +01:00
committed by Mis012
parent e9cf5e7002
commit cb7805bb45
2 changed files with 15 additions and 18 deletions

View File

@@ -157,7 +157,6 @@ public class Activity extends ContextThemeWrapper implements Window.Callback {
protected void onCreate(Bundle savedInstanceState) {
Slog.i(TAG, "- onCreate - yay!");
new ViewGroup(this).setId(R.id.content);
for (Fragment fragment : fragments) {
fragment.onCreate(savedInstanceState);
@@ -176,6 +175,7 @@ public class Activity extends ContextThemeWrapper implements Window.Callback {
if (window.contentView != null)
window.setContentView(window.contentView);
window.setTitle(title);
window.attached();
for (Fragment fragment : fragments) {
fragment.onStart();