Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

change status bar color android programmatically

 public void statuscolor(){
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            Window window = getWindow();
            window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
            window.setStatusBarColor(Color.parseColor(getPreferences().getString(Constant.SECONDARY_COLOR, Constant.SECONDARY_COLOR)));
        }
    }
Comment

android status bar color

 <!-- in themes -->
<item name="android:statusBarColor">@color/color</item>
Comment

change status bar text color android programmatically

WindowInsetsControllerCompat(<window>, <view>).isAppearanceLightStatusBars = Boolean
Window window = Activity.getWindow();
View view = window.getDecorView();

// You need androidx.core for this
Comment

change statusbar color for android

<StatusBar backgroundColor="orange" />
Comment

PREVIOUS NEXT
Code Example
Java :: how to convert int array to integer list in java 
Java :: find if a number is in a 2d array java 
Java :: how to delete a object in java 
Java :: java queue 
Java :: how-to-check-internet-connection-in-android 
Java :: difference between java and javax 
Java :: text.settextcolor android 
Java :: jagged array java 
Java :: float random class java 
Java :: How to perform counting sort in Java? 
Java :: java read first line of file 
Java :: java alert box 
Java :: android studio textbox change text 
Java :: creating array java 
Java :: how to know java version in cmd 
Java :: java shutdown hook 
Java :: java generate secure random password 
Java :: Java debug log 
Java :: java char to charsequence 
Java :: i have AdoptOpenJDK 8 but java --version gettinbg Unrecognized option: --version Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. 
Java :: java calendar hour vs hour of day 
Java :: sorting an arraylist 
Java :: delay a function call in java 
Java :: delete ending part of the string java 
Java :: jbutton set on action 
Java :: initialize arraylist in 1 line in java 
Java :: recycler view implementation 
Java :: support different screen sizes android 
Java :: java flowlayout 
Java :: uppercase string java 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =