Add dark theme

This commit is contained in:
Daniele Gobbetti 2016-10-21 23:01:10 +02:00
parent 00938baf7d
commit c20747226f
2 changed files with 14 additions and 1 deletions

View File

@ -68,6 +68,12 @@ public class ControlCenterv2 extends AppCompatActivity
@Override
protected void onCreate(Bundle savedInstanceState) {
if (GBApplication.isDarkThemeEnabled()) {
setTheme(R.style.GadgetbridgeThemeDark_NoActionBar);
} else {
setTheme(R.style.GadgetbridgeTheme_NoActionBar);
}
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_controlcenterv2);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);

View File

@ -14,6 +14,13 @@
<item name="chart_activity">@color/chart_activity_light</item>
-->
</style>
<style name="GadgetbridgeTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<!-- dark theme -->
<style name="GadgetbridgeThemeDark" parent="Theme.AppCompat">
<item name="android:textColor">@color/primarytext_dark</item>
<item name="android:textColorSecondary">@color/secondarytext</item>
@ -29,7 +36,7 @@
-->
</style>
<style name="GadgetbridgeTheme.NoActionBar">
<style name="GadgetbridgeThemeDark.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>