0

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.

Image 1

Image 2

How should I do it in my program.

Thanks in advance.

WarrenFaith
  • 57,492
  • 25
  • 134
  • 150
  • The keyword for searching is: "Android transparent status bar". First hit: http://blog.raffaeu.com/archive/2015/04/11/android-and-the-transparent-status-bar.aspx I will now vote to close as this is not a on-topic question for SO. Please read the [FAQ] for more details about how to ask what kind of questions. – WarrenFaith Mar 08 '16 at 14:44
  • Thanks WarrenFaith but the status bar shown in the blog u referred shows the bar with some dark shade. How to deal with that? – Abhishek Kulshrestha Mar 08 '16 at 14:50
  • You should start searching! Two clicks to find this: http://stackoverflow.com/questions/21865621/transparent-status-bar-before-4-4-kitkat See the right lower list titled: "Related" You can find good related questions and answers there! – WarrenFaith Mar 08 '16 at 14:54
  • Thankx a lot :) WarrenFaith – Abhishek Kulshrestha Mar 08 '16 at 14:57

2 Answers2

0

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.

0

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"));

    }
vabhi vab
  • 419
  • 4
  • 11