fix #91: Material Design

- use 'com.android.support:appcompat-v7:22.0.0' instead of version 20.0.0
- ActionBar color: "F-Droid Blue" (also option for "F-Droid Green")
- fix invisible swap button with Material Design
- remove "Light + dark action bar" theme (as of Action Bar is always blue/green)
This commit is contained in:
Nico Alt 2015-04-21 21:55:07 +02:00
parent d6aa60b211
commit 03c5a224de
6 changed files with 25 additions and 31 deletions

View File

@ -17,7 +17,7 @@ if ( !hasProperty( 'sourceDeps' ) ) {
dependencies {
compile 'com.android.support:support-v4:20.0.0',
'com.android.support:appcompat-v7:20.0.0',
'com.android.support:appcompat-v7:22.0.0',
'com.android.support:support-annotations:20.0.0',
'org.thoughtcrime.ssl.pinning:AndroidPinning:1.0.0',

View File

@ -1,15 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppBaseThemeDark" parent="Theme.AppCompat">
<!-- API 11 theme customizations go here -->
<style name="SwapTheme.StartSwap.StartButton">
<item name="android:textColor">#fff</item>
</style>
<style name="AppBaseThemeLight" parent="Theme.AppCompat.Light">
<!-- API 11 theme customizations go here -->
</style>
<style name="AppBaseThemeLightWithDarkActionBar" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- API 11 theme customizations go here -->
</style>
</resources>
</resources>

View File

@ -13,6 +13,5 @@
<string-array name="themeNames">
<item>Dark</item>
<item>Light</item>
<item>Light (with dark action bar)</item>
</string-array>
</resources>

View File

@ -26,7 +26,6 @@
<string-array name="themeValues">
<item>dark</item>
<item>light</item>
<item>lightWithDarkActionBar</item>
</string-array>
<string-array name="languageValues">

View File

@ -2,14 +2,24 @@
<style name="AppBaseThemeDark" parent="Theme.AppCompat">
<!-- backward-compatibility theme options go here -->
<!-- ActionBar Color -->
<!-- "F-Droid Green" -/->
<item name="colorPrimary">#FFAAD024</item>-->
<!-- "F-Droid Blue -->
<item name="colorPrimary">#FF6097C5</item>
</style>
<style name="AppBaseThemeLight" parent="Theme.AppCompat.Light">
<style name="AppBaseThemeLight" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- backward-compatibility theme options go here -->
</style>
<style name="AppBaseThemeLightWithDarkActionBar" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- backward-compatibility theme options go here -->
<!-- ActionBar Color -->
<!-- "F-Droid Green" -/->
<item name="colorPrimary">#FFAAD024</item>-->
<!-- "F-Droid Blue -->
<item name="colorPrimary">#FF6097C5</item>
</style>
<color name="black">#FF000000</color>
@ -29,24 +39,20 @@
<!-- customizations that are not API-level specific go here. -->
</style>
<style name="AppThemeLightWithDarkActionBar" parent="AppBaseThemeLightWithDarkActionBar">
<!-- customizations that are not API-level specific go here. -->
</style>
<style name="SwapTheme.Wizard" parent="AppThemeDark">
<item name="android:windowBackground">@drawable/swap_window_background</item>
<item name="android:actionBarStyle">@style/Widget.AppCompat.ActionBar.Solid</item>
<item name="android:actionButtonStyle">@style/SwapTheme.Wizard.ActionButton</item>
</style>
<style name="SwapTheme.StartSwap" parent="AppThemeLightWithDarkActionBar">
<style name="SwapTheme.StartSwap" parent="AppThemeLight">
<item name="android:background">@color/white</item>
</style>
<style name="SwapTheme.AppList" parent="AppThemeLightWithDarkActionBar">
<style name="SwapTheme.AppList" parent="AppThemeLight">
</style>
<style name="SwapTheme.AppList.ListItem" parent="AppThemeLightWithDarkActionBar">
<style name="SwapTheme.AppList.ListItem" parent="AppThemeLight">
</style>
<style name="SwapTheme.StartSwap.StartButton">
@ -57,7 +63,6 @@
<item name="android:textSize">18.5sp</item> <!-- 33px * 96dpi / 160dpi -->
<item name="android:background">@drawable/swap_start_button_skin</item>
<item name="android:textColor">#fff</item>
<item name="android:drawableLeft">@drawable/ic_swap</item>
<item name="android:paddingLeft">10dp</item>
@ -179,4 +184,4 @@
<item name="android:textStyle">italic</item>
</style>
</resources>
</resources>

View File

@ -87,12 +87,12 @@ public class FDroidApp extends Application {
dark, light, lightWithDarkActionBar
}
private static Theme curTheme = Theme.dark;
private static Theme curTheme = Theme.light;
public void reloadTheme() {
curTheme = Theme.valueOf(PreferenceManager
.getDefaultSharedPreferences(getBaseContext())
.getString(Preferences.PREF_THEME, "dark"));
.getString(Preferences.PREF_THEME, Preferences.DEFAULT_THEME));
}
public void applyTheme(Activity activity) {