Skip to content

Commit dca15cc

Browse files
committed
gradle upgraded
The bug caused multiple arrow when text changed to multiline, fixed
1 parent f9d48a7 commit dca15cc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

SmartSpinner/src/main/java/ir/smartdevelopers/smartspinner/SmartSpinner.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import android.util.AttributeSet;
66
import android.view.View;
77

8+
import androidx.annotation.StyleableRes;
89
import androidx.appcompat.widget.AppCompatTextView;
910

1011
public class SmartSpinner extends AppCompatTextView {
@@ -38,7 +39,8 @@ private void init(Context context,AttributeSet attributeSet){
3839

3940
boolean roundArrow=false;
4041
if (attributeSet!=null){
41-
int[] set={android.R.attr.layoutDirection};
42+
@StyleableRes
43+
int[] set= new int[]{android.R.attr.layoutDirection};
4244
TypedArray typedArray=context.obtainStyledAttributes(attributeSet,set);
4345
mDirection =typedArray.getInt(0, View.LAYOUT_DIRECTION_LTR);
4446
typedArray=context.obtainStyledAttributes( attributeSet,R.styleable.SmartSpinner);
@@ -74,8 +76,9 @@ private void init(Context context,AttributeSet attributeSet){
7476
@Override
7577
public void setEnabled(boolean enabled) {
7678
super.setEnabled(enabled);
77-
if (spinnerBackground!=null)
78-
spinnerBackground.setEnabled(enabled);
79+
if (spinnerBackground!=null) {
80+
spinnerBackground.setEnabled(enabled);
81+
}
7982
}
8083

8184
public int getTint() {

0 commit comments

Comments
 (0)