Skip to content

Commit

Permalink
fix: update autofillHints name (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
jleon15 authored Feb 2, 2024
1 parent 8c96166 commit c1d0c7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ open class TextElement @JvmOverloads constructor(

hintTextColor = getColor(R.styleable.TextElement_android_textColorHint, Color.LTGRAY)

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
textAutofillHints = getString(R.styleable.TextElement_android_autofillHints)?.split(",")?.toTypedArray()
}

typeface = resolveTypeface(
getInt(R.styleable.TextElement_android_typeface, 0),
defStyleAttr
Expand Down Expand Up @@ -263,7 +267,7 @@ open class TextElement @JvmOverloads constructor(
checkIcon?.setTint(value)
}

var autoFillHints: Array<String>?
var textAutofillHints: Array<String>?
@RequiresApi(Build.VERSION_CODES.O)
get() = _editText.autofillHints
@RequiresApi(Build.VERSION_CODES.O)
Expand Down
1 change: 1 addition & 0 deletions lib/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<attr name="android:textColorHint" />
<attr name="android:typeface" />
<attr name="android:gravity" />
<attr name="android:autofillHints" />

<attr name="bt_mask" format="string" />
<attr name="bt_removeDefaultStyles" format="boolean" />
Expand Down

0 comments on commit c1d0c7e

Please sign in to comment.