Fix theme problems

This commit is contained in:
Dominik Schürmann 2015-08-18 11:19:50 +02:00
parent 979605b5de
commit 2ef691b264
11 changed files with 27 additions and 19 deletions

View file

@ -701,7 +701,7 @@
-->
<activity
android:name=".ui.NfcOperationActivity"
android:theme="@style/Theme.Keychain.Light.Dialog.SecurityToken"
android:theme="@style/Theme.Keychain.Light.Dialog"
android:allowTaskReparenting="true"
android:launchMode="singleTop"
android:taskAffinity=":Nfc" />

View file

@ -79,8 +79,8 @@ public class NfcOperationActivity extends BaseNfcActivity {
@Override
protected void initTheme() {
mThemeChanger = new ThemeChanger(this);
mThemeChanger.setThemes(R.style.Theme_Keychain_Light_Dialog_SecurityToken,
R.style.Theme_Keychain_Dark_Dialog_SecurityToken);
mThemeChanger.setThemes(R.style.Theme_Keychain_Light_Dialog,
R.style.Theme_Keychain_Dark_Dialog);
mThemeChanger.changeTheme();
}

View file

@ -40,9 +40,9 @@ public class ThemeChanger {
// hack to get holo design (which is not automatically applied due to activity's
// Theme.NoDisplay)
if (Constants.Pref.Theme.DARK.equals(preferences.getTheme())) {
return new ContextThemeWrapper(context, R.style.Theme_AppCompat_Dialog);
return new ContextThemeWrapper(context, R.style.Theme_Keychain_Dark);
} else {
return new ContextThemeWrapper(context, R.style.Theme_AppCompat_Light_Dialog);
return new ContextThemeWrapper(context, R.style.Theme_Keychain_Light);
}
}

View file

@ -29,7 +29,7 @@
android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:overScrollMode="always"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
tools:ignore="UnusedAttribute"
android:transitionGroup="false"

View file

@ -13,7 +13,7 @@
android:elevation="4dp"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
tools:ignore="UnusedAttribute" />

View file

@ -162,15 +162,13 @@
<Button
android:id="@+id/nfc_activity_3_error_try_again"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/nfc_activity_3_placeholder"
android:layout_margin="8dp"
android:text="@string/error_nfc_try_again"
android:textColor="@color/accent" />
android:text="@string/error_nfc_try_again" />
</RelativeLayout>

View file

@ -20,7 +20,7 @@
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:background="@color/transparent"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
tools:ignore="UnusedAttribute" />
</merge>

View file

@ -20,7 +20,7 @@
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:background="@color/transparent"
app:theme="@style/ThemeOverlay.AppCompat.ActionBar"
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
tools:ignore="UnusedAttribute" />
</merge>

View file

@ -45,7 +45,7 @@
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:overScrollMode="always"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
tools:ignore="UnusedAttribute"
android:transitionGroup="false"

View file

@ -34,4 +34,8 @@
<item name="android:background">?android:attr/listDivider</item>
</style>
<style name="MaterialFlatButton" parent="@style/Widget.AppCompat.Button.Borderless">
<item name="android:textColor">?attr/colorAccent</item>
</style>
</resources>

View file

@ -39,7 +39,7 @@
<item name="searchViewStyle">@style/Widget.Keychain.SearchView</item>
<!-- style dialogs -->
<item name="alertDialogTheme">@style/Theme.Keychain.Light.Dialog</item>
<item name="alertDialogTheme">@style/Theme.Keychain.Light.Dialog.Alert</item>
</style>
<style name="Base.Theme.Keychain.Dark" parent="MaterialDrawerTheme.ActionBar">
@ -82,7 +82,7 @@
<item name="searchViewStyle">@style/Widget.Keychain.SearchView</item>
<!-- style dialogs -->
<item name="alertDialogTheme">@style/Theme.Keychain.Dark.Dialog</item>
<item name="alertDialogTheme">@style/Theme.Keychain.Dark.Dialog.Alert</item>
</style>
<style name="Theme.Keychain.Light" parent="Base.Theme.Keychain.Light">
@ -111,20 +111,26 @@
<!--<item name="suggestionRowLayout">...</item>-->
</style>
<style name="Theme.Keychain.Light.Dialog" parent="Base.Theme.AppCompat.Light.Dialog.Alert">
<style name="Theme.Keychain.Light.Dialog.Alert" parent="Base.Theme.AppCompat.Light.Dialog.Alert">
<item name="colorAccent">#7bad45</item>
</style>
<style name="Theme.Keychain.Dark.Dialog" parent="Base.Theme.AppCompat.Dialog.Alert">
<style name="Theme.Keychain.Dark.Dialog.Alert" parent="Base.Theme.AppCompat.Dialog.Alert">
<item name="colorAccent">#268bd2</item>
</style>
<style name="Theme.Keychain.Light.Dialog.SecurityToken" parent="Theme.AppCompat.Light.Dialog.MinWidth">
<style name="Theme.Keychain.Light.Dialog" parent="Theme.AppCompat.Light.Dialog.MinWidth">
<item name="colorAccent">#7bad45</item>
<item name="android:buttonStyle">@style/MaterialFlatButton</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.Keychain.Dark.Dialog.SecurityToken" parent="Theme.AppCompat.Dialog.MinWidth">
<style name="Theme.Keychain.Dark.Dialog" parent="Theme.AppCompat.Dialog.MinWidth">
<item name="colorAccent">#268bd2</item>
<item name="android:buttonStyle">@style/MaterialFlatButton</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>