Hopefully fixes drop down icon for spinners on Android lower 5

This commit is contained in:
Dominik Schürmann 2015-02-26 17:32:08 +01:00
parent 72acaaa41f
commit 4c4782bd5e
2 changed files with 6 additions and 21 deletions

View File

@ -24,13 +24,13 @@ import android.support.v4.app.FragmentActivity;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.Loader;
import android.support.v4.widget.CursorAdapter;
import android.support.v7.internal.widget.TintSpinner;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.Spinner;
import android.widget.SpinnerAdapter;
import android.widget.TextView;
@ -41,7 +41,11 @@ import org.sufficientlysecure.keychain.provider.KeychainContract;
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
import org.sufficientlysecure.keychain.util.Log;
public abstract class KeySpinner extends Spinner implements LoaderManager.LoaderCallbacks<Cursor> {
/**
* Use TintSpinner from AppCompat lib instead of Spinner. Fixes white dropdown icon.
* Related: http://stackoverflow.com/a/27713090
*/
public abstract class KeySpinner extends TintSpinner implements LoaderManager.LoaderCallbacks<Cursor> {
public interface OnKeyChangedListener {
public void onKeyChanged(long masterKeyId);
}

View File

@ -1,24 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Used in Android < 4 -->
<style name="KeychainThemeOLD" parent="@style/Theme.AppCompat.Light">
<item name="android:alertDialogStyle">@style/CustomDialogTheme</item>
</style>
<!-- Ugly fix to make content background of Dialogs on Android < 4 white not black! -->
<style name="CustomDialogTheme" parent="@android:style/Theme.Dialog">
<item name="android:fullDark">@drawable/popup_full_bright</item>
<!--<item name="android:topDark">@android:drawable/popup_full_dark</item>-->
<item name="android:centerDark">@drawable/popup_center_bright</item>
<!--<item name="android:bottomDark">@android:drawable/popup_bottom_dark</item>-->
<!--<item name="fullBright">@android:drawable/popup_full_bright</item>-->
<!--<item name="topBright">@android:drawable/popup_top_bright</item>-->
<!--<item name="centerBright">@android:drawable/popup_center_bright</item>-->
<!--<item name="bottomBright">@android:drawable/popup_bottom_bright</item>-->
<!--<item name="bottomMedium">@android:drawable/popup_bottom_medium</item>-->
<!--<item name="centerMedium">@android:drawable/popup_center_medium</item>-->
</style>
<style name="CardViewHeader">
<item name="android:drawableBottom">@drawable/cardview_header</item>