From f96c63401f5640345447d9a7704c0724e655a861 Mon Sep 17 00:00:00 2001 From: PeratX <1215714524@qq.com> Date: Mon, 24 Apr 2017 23:47:21 +0800 Subject: [PATCH] Transparent status bar --- .../main/java/org/itxtech/daedalus/activity/MainActivity.java | 1 + .../main/java/org/itxtech/daedalus/fragment/MainFragment.java | 2 -- .../res/drawable/{ic_github.xml => ic_github_black_24dp.xml} | 0 app/src/main/res/menu/activity_main_drawer.xml | 2 +- app/src/main/res/values-v21/styles.xml | 4 ++++ 5 files changed, 6 insertions(+), 3 deletions(-) rename app/src/main/res/drawable/{ic_github.xml => ic_github_black_24dp.xml} (100%) diff --git a/app/src/main/java/org/itxtech/daedalus/activity/MainActivity.java b/app/src/main/java/org/itxtech/daedalus/activity/MainActivity.java index a5007d7..3d456a0 100644 --- a/app/src/main/java/org/itxtech/daedalus/activity/MainActivity.java +++ b/app/src/main/java/org/itxtech/daedalus/activity/MainActivity.java @@ -69,6 +69,7 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On @Override protected void onCreate(Bundle savedInstanceState) { + setTheme(R.style.AppTheme_NoActionBar_TransparentStatusBar); super.onCreate(savedInstanceState); instance = this; diff --git a/app/src/main/java/org/itxtech/daedalus/fragment/MainFragment.java b/app/src/main/java/org/itxtech/daedalus/fragment/MainFragment.java index b63e9ac..ffedda2 100644 --- a/app/src/main/java/org/itxtech/daedalus/fragment/MainFragment.java +++ b/app/src/main/java/org/itxtech/daedalus/fragment/MainFragment.java @@ -87,7 +87,6 @@ public class MainFragment extends Fragment { public void activateService() { Intent intent = VpnService.prepare(Daedalus.getInstance()); - view.findViewById(R.id.button_activate).setVisibility(View.INVISIBLE); if (intent != null) { startActivityForResult(intent, 0); } else { @@ -104,7 +103,6 @@ public class MainFragment extends Fragment { Button button = (Button) view.findViewById(R.id.button_activate); button.setText(R.string.button_text_deactivate); - button.setVisibility(View.VISIBLE); } } diff --git a/app/src/main/res/drawable/ic_github.xml b/app/src/main/res/drawable/ic_github_black_24dp.xml similarity index 100% rename from app/src/main/res/drawable/ic_github.xml rename to app/src/main/res/drawable/ic_github_black_24dp.xml diff --git a/app/src/main/res/menu/activity_main_drawer.xml b/app/src/main/res/menu/activity_main_drawer.xml index 88fef54..9fa17fb 100644 --- a/app/src/main/res/menu/activity_main_drawer.xml +++ b/app/src/main/res/menu/activity_main_drawer.xml @@ -26,6 +26,6 @@ + android:icon="@drawable/ic_github_black_24dp"/> diff --git a/app/src/main/res/values-v21/styles.xml b/app/src/main/res/values-v21/styles.xml index b1774b6..33f64a8 100644 --- a/app/src/main/res/values-v21/styles.xml +++ b/app/src/main/res/values-v21/styles.xml @@ -13,4 +13,8 @@ true true + +