Skip to content

Commit dbba059

Browse files
authored
[ADVSEG-7648] End icon not clearing (#1597)
1 parent 9a9a45d commit dbba059

File tree

1 file changed

+8
-8
lines changed
  • urbanairship-layout/src/main/java/com/urbanairship/android/layout/view

1 file changed

+8
-8
lines changed

urbanairship-layout/src/main/java/com/urbanairship/android/layout/view/TextInputView.kt

+8-8
Original file line numberDiff line numberDiff line change
@@ -78,21 +78,21 @@ internal class TextInputView(
7878
default = model.viewInfo.iconEnd
7979
)
8080

81-
val errorDrawable = when (resolved) {
81+
val endDrawable = when (resolved) {
8282
is TextInputInfo.IconEnd.Floating ->
8383
resolved.icon.getDrawable(context, isEnabled)
8484
else -> null
8585
}
8686

87-
errorDrawable?.let {
88-
val size = spToPx(context, model.viewInfo.textAppearance.fontSize).toInt()
87+
endDrawable?.let {
88+
val size = spToPx(context, model.viewInfo.textAppearance.fontSize).toInt()
8989
it.setBounds(0, 0, size, size)
90+
}
9091

91-
if (isLayoutRtl) {
92-
setCompoundDrawables(it, null, null, null)
93-
} else {
94-
setCompoundDrawables(null, null, it, null)
95-
}
92+
if (isLayoutRtl) {
93+
setCompoundDrawables(endDrawable, null, null, null)
94+
} else {
95+
setCompoundDrawables(null, null, endDrawable, null)
9696
}
9797
}
9898
}

0 commit comments

Comments
 (0)