CopyPastor

Detecting plagiarism made easy.

Score: 1; Reported for: Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2018-05-18
by josedlujan

Original Post

Original - Posted on 2015-07-23
by Machado



            
Present in both answers; Present only in the new answer; Present only in the old answer;

Use Translucent:
<resources> <style name="Theme" parent="android:Theme.Material.Wallpaper.NoTitleBar"> <item name="android:statusBarColor">@android:color/transparent</item> <item name="android:navigationBarColor">@android:color/transparent</item> <item name="android:windowTranslucentStatus">true</item> <item name="android:windowTranslucentNavigation">true</item> </style> </resources>

your transparent activity property set:
android:fitsSystemWindows="true"
Update --
You can achieve the same effect programatically on KitKat and afterwards by setting the `FLAG_LAYOUT_NO_LIMITS` flag inside the `Window`.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { Window w = getWindow(); // in Activity's onCreate() for instance w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); }
If you set a background resource (*like a color or a picture*) to your layout, you will see the color or picture "below" the status bar.
<item name="android:windowDrawsSystemBarBackgrounds">true</item> <item name="android:statusBarColor">@color/primary_dark</item>
---- Original Answer --
It looks like `android:windowTranslucentStatus` and `android:windowTranslucentNavigation` should be `true` instead of `false`
<resources> <style name="Theme" parent="android:Theme.Material.Wallpaper.NoTitleBar"> <item name="android:statusBarColor">@android:color/transparent</item> <item name="android:navigationBarColor">@android:color/transparent</item> <item name="android:windowTranslucentStatus">true</item> <item name="android:windowTranslucentNavigation">true</item> </style> </resources>
Also, your transparent activity / container layout needs this property set:
android:fitsSystemWindows="true"
[Source][1] [1]: https://stackoverflow.com/a/29311321/1549700

        
Present in both answers; Present only in the new answer; Present only in the old answer;