I'm trying to use the android:fitsSystemWindows
attribute on a view so that it does not get blocked by my translucent navigation bar, but it's not doing anything. The Android documentation on it says fitsSystemWindows
"Will only take effect if this view is in a non-embedded activity."
What is an embedded activity? Would it be possible for me to have accidentally created one? And is it possible to get the effect of fitsSystemWindows within one?
An embedded Activity is an Activity which is hosted inside a parent Activity. The common example being the TabHost/TabActivity design. In particular, embedded Acitvities reside in the host's LocalActivityManager
, which is conceptually similar to the FragmentManager
which allows you to display one Activity inside another.
Given this definition, it is easy to understand why only the host (non embedded) Activity can support the fitsSystemWindows
attribute, as any embedded Activities are restricted to the area defined by their host.
It is very unlikely you will have accidentally created one.
See: android: using ActivityGroup to embed activities
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With