Skip to content

Commit

Permalink
update ui
Browse files Browse the repository at this point in the history
  • Loading branch information
woioiow committed Dec 24, 2020
1 parent 98292df commit e6d83d5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions easy-ui/src/main/java/com/moioio/android/easyui/MyActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,28 @@ public Context getContext() {



public void setNavigationBarColor(int color)
{
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {

getWindow().setNavigationBarColor(color);
}
}

public void setNavigationBarStatusBarTranslucent(){
if (Build.VERSION.SDK_INT >= 21) {
View decorView = getWindow().getDecorView();
int option = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
decorView.setSystemUiVisibility(option);
getWindow().setNavigationBarColor(Color.TRANSPARENT);
getWindow().setStatusBarColor(Color.TRANSPARENT);
}
}



public void setWindowStatusBarTrans() {
try {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Expand Down

0 comments on commit e6d83d5

Please sign in to comment.