Skip to content

Commit

Permalink
style(theme):adjust theme
Browse files Browse the repository at this point in the history
  • Loading branch information
ZCShou committed Dec 4, 2022
1 parent b8ae3d5 commit add0e83
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
6 changes: 5 additions & 1 deletion app/src/main/java/com/zcshou/gogogo/HistoryActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ public class HistoryActivity extends BaseActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// 临时处理,因为没有找到其他方法处理 填充 StatusBar
/* 为了启动欢迎页全屏,状态栏被设置了透明,但是会导致其他页面状态栏空白
* 这里设计如下:
* 1. 除了 WelcomeActivity 之外的所有 Activity 均继承 BaseActivity
* 2. WelcomeActivity 单独处理,其他 Activity 手动填充 StatusBar
* */
getWindow().setStatusBarColor(getResources().getColor(R.color.colorPrimary, this.getTheme()));

setContentView(R.layout.activity_history);
Expand Down
6 changes: 5 additions & 1 deletion app/src/main/java/com/zcshou/gogogo/SettingsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ public class SettingsActivity extends BaseActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// 临时处理,因为没有找到其他方法处理 填充 StatusBar
/* 为了启动欢迎页全屏,状态栏被设置了透明,但是会导致其他页面状态栏空白
* 这里设计如下:
* 1. 除了 WelcomeActivity 之外的所有 Activity 均继承 BaseActivity
* 2. WelcomeActivity 单独处理,其他 Activity 手动填充 StatusBar
* */
getWindow().setStatusBarColor(getResources().getColor(R.color.colorPrimary, this.getTheme()));

setContentView(R.layout.activity_settings);
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header"
app:menu="@menu/menu_nav" />

Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/main_content.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
android:contentDescription="@null"
app:elevation="6dp"
app:pressedTranslationZ="12dp"
app:rippleColor="#a9a9a9"
app:srcCompat="@drawable/ic_position" />

<LinearLayout
Expand Down

0 comments on commit add0e83

Please sign in to comment.