mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-30 08:11:17 +00:00
Fixing weird dialog background on versions earlier than Lollipop.
Standardised theme names. Renamed styles.xml to themes.xml to keep these separate. Fixes #425.
This commit is contained in:
parent
864c5f9196
commit
90b5d2ff9a
4 changed files with 20 additions and 20 deletions
|
@ -15,7 +15,7 @@
|
|||
android:icon="@drawable/ic_launcher"
|
||||
android:banner="@drawable/banner"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme"
|
||||
android:theme="@style/Theme.Syncthing"
|
||||
android:description="@string/app_description"
|
||||
android:supportsRtl="true"
|
||||
android:installLocation="internalOnly">
|
||||
|
@ -67,7 +67,7 @@
|
|||
android:value="splitActionBarWhenNarrow" />
|
||||
</activity>
|
||||
<activity android:name=".activities.RestartActivity"
|
||||
android:theme="@style/Translucent"/>
|
||||
android:theme="@style/Theme.Syncthing.Translucent"/>
|
||||
|
||||
<service android:name=".syncthing.SyncthingService" />
|
||||
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- DialogTheme produces weird background on 4.4, so we only use it on Lollipop for now. -->
|
||||
<style name="AppTheme" parent="BaseTheme">
|
||||
<item name="android:alertDialogTheme">@style/DialogTheme</item>
|
||||
</style>
|
||||
|
||||
<style name="DialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert">
|
||||
<item name="colorPrimary">@color/primary</item>
|
||||
<item name="colorPrimaryDark">@color/primary_dark</item>
|
||||
<item name="colorAccent">@color/accent</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
9
src/main/res/values-v21/themes.xml
Normal file
9
src/main/res/values-v21/themes.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- DialogTheme produces weird background on 4.4, so we only use it on Lollipop for now. -->
|
||||
<style name="Theme.Syncthing" parent="Theme.Syncthing.Base">
|
||||
<item name="android:alertDialogTheme">@style/Theme.Syncthing.Dialog</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="BaseTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
|
||||
<style name="Theme.Syncthing.Base" parent="@style/Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="colorPrimary">@color/primary</item>
|
||||
<item name="colorPrimaryDark">@color/primary_dark</item>
|
||||
<item name="colorAccent">@color/accent</item>
|
||||
|
@ -9,9 +9,9 @@
|
|||
<item name="android:textColorSecondary">@color/secondary_text</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme" parent="BaseTheme"/>
|
||||
<style name="Theme.Syncthing" parent="Theme.Syncthing.Base"/>
|
||||
|
||||
<style name="Translucent" parent="AppTheme">
|
||||
<style name="Theme.Syncthing.Translucent">
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:colorBackgroundCacheHint">@null</item>
|
||||
|
@ -19,4 +19,10 @@
|
|||
<item name="android:windowAnimationStyle">@android:style/Animation</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Syncthing.Dialog" parent="Theme.AppCompat.Light.Dialog.Alert">
|
||||
<item name="colorPrimary">@color/primary</item>
|
||||
<item name="colorPrimaryDark">@color/primary_dark</item>
|
||||
<item name="colorAccent">@color/accent</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
Loading…
Reference in a new issue