MainActivity: Dispatch insets to all fragments
Fixes tunnel list fragment rendering behind statusbar when other fragments are showing Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
0db2578ca0
commit
e8c9c20570
@ -79,7 +79,9 @@ public class MainActivity extends BaseActivity
|
|||||||
final FragmentManager fragmentManager = getSupportFragmentManager();
|
final FragmentManager fragmentManager = getSupportFragmentManager();
|
||||||
fragmentManager.addOnBackStackChangedListener(() -> {
|
fragmentManager.addOnBackStackChangedListener(() -> {
|
||||||
final List<Fragment> fragments = fragmentManager.getFragments();
|
final List<Fragment> fragments = fragmentManager.getFragments();
|
||||||
fragments.get(fragments.size() - 1).requireView().dispatchApplyWindowInsets(insets);
|
for (int i = 0; i < fragments.size(); i++) {
|
||||||
|
fragments.get(i).requireView().dispatchApplyWindowInsets(insets);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user