Skip to content

Commit 4fdcc4a

Browse files
committed
The new material library introduced some changes in the hierachies of textinputlayout
1 parent 0d12da8 commit 4fdcc4a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/src/main/res/raw/sample_form.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"Tag": "country",
5656
"Hint": "Country",
5757
"Name": "Country",
58-
"DropDownSelectedValue": "2",
58+
"DropDownSelectedValue": "United States",
5959
"ValidationRule": {
6060
"Mandatory": true
6161
}

formview/src/main/java/com/seed/widgets/formview/FormView.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,10 @@ class FormView @JvmOverloads constructor(
284284
Pair(
285285
view.tag.toString(),
286286
when (val view =
287-
((view.children.first() as FrameLayout).children.first())) {
287+
((view.children.first() as FrameLayout)
288+
.children
289+
.filter { it is TextInputEditText || it is MaterialAutoCompleteTextView}
290+
.first())) {
288291
is TextInputEditText -> {
289292
view.text.toString()
290293
}

0 commit comments

Comments
 (0)