1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-18 14:47:46 +01:00

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>