Android Transparent status bar

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

}

Post a Comment

1Comments
  1. This post exceeded my expectations in every way zamenuprices.com. It was clear, engaging, and packed with useful points I can revisit whenever needed.

    ReplyDelete
Post a Comment

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !