mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-18 22:57:48 +01:00
Add dark theme
This commit is contained in:
parent
00938baf7d
commit
c20747226f
@ -68,6 +68,12 @@ public class ControlCenterv2 extends AppCompatActivity
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
if (GBApplication.isDarkThemeEnabled()) {
|
||||||
|
setTheme(R.style.GadgetbridgeThemeDark_NoActionBar);
|
||||||
|
} else {
|
||||||
|
setTheme(R.style.GadgetbridgeTheme_NoActionBar);
|
||||||
|
}
|
||||||
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_controlcenterv2);
|
setContentView(R.layout.activity_controlcenterv2);
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||||
|
@ -14,6 +14,13 @@
|
|||||||
<item name="chart_activity">@color/chart_activity_light</item>
|
<item name="chart_activity">@color/chart_activity_light</item>
|
||||||
-->
|
-->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="GadgetbridgeTheme.NoActionBar">
|
||||||
|
<item name="windowActionBar">false</item>
|
||||||
|
<item name="windowNoTitle">true</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- dark theme -->
|
||||||
<style name="GadgetbridgeThemeDark" parent="Theme.AppCompat">
|
<style name="GadgetbridgeThemeDark" parent="Theme.AppCompat">
|
||||||
<item name="android:textColor">@color/primarytext_dark</item>
|
<item name="android:textColor">@color/primarytext_dark</item>
|
||||||
<item name="android:textColorSecondary">@color/secondarytext</item>
|
<item name="android:textColorSecondary">@color/secondarytext</item>
|
||||||
@ -29,7 +36,7 @@
|
|||||||
-->
|
-->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="GadgetbridgeTheme.NoActionBar">
|
<style name="GadgetbridgeThemeDark.NoActionBar">
|
||||||
<item name="windowActionBar">false</item>
|
<item name="windowActionBar">false</item>
|
||||||
<item name="windowNoTitle">true</item>
|
<item name="windowNoTitle">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user