File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
SmartSpinner/src/main/java/ir/smartdevelopers/smartspinner Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 55import android .util .AttributeSet ;
66import android .view .View ;
77
8+ import androidx .annotation .StyleableRes ;
89import androidx .appcompat .widget .AppCompatTextView ;
910
1011public 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 () {
You can’t perform that action at this time.
0 commit comments