Skip to main content

Android Transparent status bar

Recently I wanted to get a transparent status bar so that my app background blends smoothly with the status bar . Below method worked




#Method 1

below snippet in the onCreate() menu help me to make it transparent.
@Overrideprotected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);


    //make status bar transparent    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT)
 {
        Window w = getWindow();
        w.addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
        w.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
    }



    setContentView(R.layout.activity_main);

}

Comments

Popular posts from this blog

Xamarin : Simple Calculator Tutorial Visual Studio C#

Simple Calculator in Android (Xamarin) using VisualStudio C#In Brief: This article will help you on building a simple calculator in android Xamarin with simple steps using C# Language in Visual Studio. Detail:
Building this simple calculator will let you learn how to work with the Android Buttons, Text View and simple functions. The UI is not so beautiful but is a great way to learn the basic functionalities.

Create Custom View in android MATRIX EFFECT CANVAS tutorial

Create Custom View in android MATRIX EFFECT CANVAS tutorial
Hi all as I stared my development with android I always wanted to create a Custom view or rather I want a canvas where I can draw freely. To learn about canvas I decided to create matrix rain effect which I can add to my android layout. Here is the complete tutorial which I have post. Hopping it will be use full to someone.

You can find the link to android project at the bottom of the post