Fredlo2010 Fredlo2010 - 1 year ago 106
Android Question

Android Translucent Status Bar Issues

I want to display an website on and iphone but I want the status bar to show transparent on top of the website. Right it displays a bark/black color.

I have read and tried a hundred of solutions online and read as much documentation about it as possible. Android Status Bar But still I cannot get it to work.



<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>

<item name="android:windowTranslucentNavigation">false</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>

<item name="windowActionModeOverlay">true</item>


public class MainActivity extends AppCompatActivity {

private WebView myWebview;

protected void onCreate(Bundle savedInstanceState) {


myWebview = (WebView) findViewById(;
WebSettings settings = myWebview.getSettings();
myWebview.setWebViewClient(new WebViewClient());



Any idea what could I be doing wrong ?

Answer Source

Try to change "android:windowTranslucentNavigation" to true. And also set FLAG_LAYOUT_NO_LIMITS in your activity:

            Window w = getWindow();
            w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);