From 7f3d962908e68cdaa16304575cd5ed34bb36e1da Mon Sep 17 00:00:00 2001 From: Angelo Marchesin Date: Fri, 24 May 2019 15:47:24 +0200 Subject: [PATCH] Default arrow tint to black --- library/src/main/java/org/angmarch/views/NiceSpinner.java | 5 ++--- library/src/main/res/drawable/spinner_drawable.xml | 8 ++++---- library/src/main/res/layout/spinner_list_item.xml | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/library/src/main/java/org/angmarch/views/NiceSpinner.java b/library/src/main/java/org/angmarch/views/NiceSpinner.java index 8fd08ab..e9c83dd 100644 --- a/library/src/main/java/org/angmarch/views/NiceSpinner.java +++ b/library/src/main/java/org/angmarch/views/NiceSpinner.java @@ -73,8 +73,7 @@ public class NiceSpinner extends AppCompatTextView { private int displayHeight; private int parentVerticalOffset; private int dropDownListPaddingBottom; - private @DrawableRes - int arrowDrawableResId; + private @DrawableRes int arrowDrawableResId; private SpinnerTextFormatter spinnerTextFormatter = new SimpleSpinnerTextFormatter(); private SpinnerTextFormatter selectedTextFormatter = new SimpleSpinnerTextFormatter(); private PopUpTextAlignment horizontalAlignment; @@ -216,7 +215,7 @@ public void onDismiss() { }); isArrowHidden = typedArray.getBoolean(R.styleable.NiceSpinner_hideArrow, false); - arrowDrawableTint = typedArray.getColor(R.styleable.NiceSpinner_arrowTint, Integer.MAX_VALUE); + arrowDrawableTint = typedArray.getColor(R.styleable.NiceSpinner_arrowTint, getResources().getColor(android.R.color.black)); arrowDrawableResId = typedArray.getResourceId(R.styleable.NiceSpinner_arrowDrawable, R.drawable.arrow); dropDownListPaddingBottom = typedArray.getDimensionPixelSize(R.styleable.NiceSpinner_dropDownListPaddingBottom, 0); diff --git a/library/src/main/res/drawable/spinner_drawable.xml b/library/src/main/res/drawable/spinner_drawable.xml index d60a19b..e2428d4 100644 --- a/library/src/main/res/drawable/spinner_drawable.xml +++ b/library/src/main/res/drawable/spinner_drawable.xml @@ -4,10 +4,10 @@ + android:bottomLeftRadius="1dp" + android:bottomRightRadius="1dp" + android:topLeftRadius="1dp" + android:topRightRadius="1dp" /> \ No newline at end of file diff --git a/library/src/main/res/layout/spinner_list_item.xml b/library/src/main/res/layout/spinner_list_item.xml index 19f86c3..93799a9 100644 --- a/library/src/main/res/layout/spinner_list_item.xml +++ b/library/src/main/res/layout/spinner_list_item.xml @@ -9,5 +9,5 @@ android:padding="@dimen/one_and_a_half_grid_unit" android:singleLine="true" android:textSize="15sp" - tools:textColor="@android:color/black" - tools:text="Item"/> + tools:text="Item" + tools:textColor="@android:color/black" />