Transparent status bar

This commit is contained in:
PeratX 2017-04-24 23:47:21 +08:00
parent 4c1fa61de0
commit f96c63401f
5 changed files with 6 additions and 3 deletions

View File

@ -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;

View File

@ -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);
}
}

View File

@ -26,6 +26,6 @@
<group android:id="@+id/nav_group_help_and_support">
<item android:id="@+id/nav_github"
android:title="@string/nav_github"
android:icon="@drawable/ic_github"/>
android:icon="@drawable/ic_github_black_24dp"/>
</group>
</menu>

View File

@ -13,4 +13,8 @@
<item name="windowNoTitle">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
</style>
<style name="AppTheme.NoActionBar.TransparentStatusBar" parent="AppTheme.NoActionBar">
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
</resources>