Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
Fix crash on KitKat happening when the spinner is gone or invisible
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelo Marchesin committed May 24, 2019
1 parent 7f3d962 commit 4001bd5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions library/src/main/java/org/angmarch/views/NiceSpinner.java
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ protected void onVisibilityChanged(View changedView, int visibility) {
}

private Drawable initArrowDrawable(int drawableTint) {
if (arrowDrawableResId == 0) return null;
Drawable drawable = ContextCompat.getDrawable(getContext(), arrowDrawableResId);
if (drawable != null) {
drawable = DrawableCompat.wrap(drawable);
Expand Down Expand Up @@ -351,13 +352,17 @@ public void setFastScrollEnabled(boolean isEnabled) {
this.listView.setFastScrollEnabled(isEnabled);
}

/** @deprecated use setOnSpinnerItemSelectedListener instead. */
/**
* @deprecated use setOnSpinnerItemSelectedListener instead.
*/
@Deprecated
public void addOnItemClickListener(AdapterView.OnItemClickListener onItemClickListener) {
this.onItemClickListener = onItemClickListener;
}

/** @deprecated use setOnSpinnerItemSelectedListener instead. */
/**
* @deprecated use setOnSpinnerItemSelectedListener instead.
*/
@Deprecated
public void setOnItemSelectedListener(AdapterView.OnItemSelectedListener onItemSelectedListener) {
this.onItemSelectedListener = onItemSelectedListener;
Expand Down

0 comments on commit 4001bd5

Please sign in to comment.