Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

reset status bar color in android

public static void changeStatusBarColor(Activity context, boolean change, int color){
    if (Build.VERSION.SDK_INT >= 21)
    {
        Window window = context.getWindow();
        window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
        window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);

        if(change){
            defaultStatusBarColor = window.getStatusBarColor();
            window.setStatusBarColor(color);
        }
        else{
            // reset
            window.setStatusBarColor(defaultStatusBarColor);
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: square operator java 
Java :: java ternärer operator 
Java :: increasing the element without any replacement in java program 
Java :: Java Get float, double and String Input 
Java :: reponse entity as result spring controller 
Java :: system.out.print 
Java :: maximise the rides with the given tokens java 
Java :: They say that they have to create an instance to their application. What does it mean? 
Java :: Determining what type of data the ArrayList will contain in java. 
Java :: java accept user input 
Java :: java hashset api 
Java :: com.google.firebase.database.DatabaseException: Serializing Arrays is not supported, please use Lists instead 
Java :: test date in java 
Java :: declar 2-d arraylist 
Java :: java max array 
Java :: what is method overriding in java 
Java :: java digit in number 
Java :: string split java 
Java :: java if with string 
Java :: extract html tag using regex 
Java :: result set methods 
Java :: convert array to arraylist 
Java :: ArrayIndexOutOfBoundsException 
Java :: why cant we have primitive types in generixs 
Java :: how to create simple java bean class for login page in eclipse 
Sql :: alter session set nls_date_format 
Sql :: remove mysql from centos 7 
Sql :: oracle finding duplicate records 
Sql :: mysql list databases 
Sql :: sql not start with vowel 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =