Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When I should use windowDrawsSystemBarBackgrounds attribute?

Tags:

android

I read some articles about android fitsSystemWindows attribute and customized behavior in some widgets for that (i.e. navigation drawer) and there is no questions. But from documentation I can't really understand the difference between windowTranslucentStatus and windowDrawsSystemBarBackgrounds. Can someone please explain when each of this attribute should/shouldn't be used?

I suppose that I need to use windowTranslucentStatus + fitsSystemWindows and windowTranslucentNavigation + clipToPadding, but what is windowDrawsSystemBarBackgrounds for?

like image 337
Vitaly Sulimov Avatar asked Jul 22 '17 23:07

Vitaly Sulimov


1 Answers

When android:windowTranslucentStatus is set to true the window requests a transparent status bar

WindowTranslucentStatus documentation

android:windowDrawsSystemBarBackgrounds set to true results that everything may be drawn under status bar on API level 21 and above.

like image 118
adithya reddy Avatar answered Nov 15 '22 17:11

adithya reddy