What is non-built-in activity and why does android not work in it: fitsSystemWindows?

I am trying to use the android:fitsSystemWindows on a view so that it is not blocked by my translucent navigation bar, but it does not do anything. The Android documentation says that fitsSystemWindows " fitsSystemWindows only take effect if this view is in non-built-in activity."

What is inline activity? Is it possible that I accidentally created it? And is it possible to get the fitsSystemWindows effect within one?

+8
android android-layout android-activity
source share
1 answer

Nested activity is activity that resides within parent activity. A common example is the design of TabHost / TabActivity. In particular, the built-in Acitvities are located in the LocalActivityManager host, which is conceptually similar to the FragmentManager , which allows you to display one action inside another.

Given this definition, it is easy to understand why only a host (non embedded) Activity can support the fitsSystemWindows attribute, since any built-in actions are limited to the scope defined by their host.

It is very unlikely that you accidentally created it.

See: android: using an ActivityGroup to embed actions

+9
source share

All Articles