I am currently running Kitkat (4.4.2) in my phone and I installed an app.
In this app, the status bar is transparent and showing the content of the app below it. Please see the images.
How should I do it in my program.
Thanks in advance.
I am currently running Kitkat (4.4.2) in my phone and I installed an app.
In this app, the status bar is transparent and showing the content of the app below it. Please see the images.
How should I do it in my program.
Thanks in advance.
As WarrenFaith suggested,http://blog.raffaeu.com/archive/2015/04/11/android-and-the-transparent-status-bar.aspx contains the detailed answer of this question.
You can use this library to tint status bar color in kitkat.
https://github.com/jgilfelt/SystemBarTint
Following is code for MainActivity.java
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) {
Window w = getWindow();
w.setFlags(
WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION,
WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
w.setFlags(
WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,
WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
SystemBarTintManager systemBarTintManager = new SystemBarTintManager(this);
systemBarTintManager.setStatusBarTintEnabled(true);
systemBarTintManager.setStatusBarTintColor(Color.parseColor("#689F38"));
}