maxkeppeler / sheets

⭐ ‎‎‎‏‏‎ ‎Offers a range of beautiful sheets (dialogs & bottom sheets) for quick use in your project. Includes many ways to customize sheets.
https://maxkeppeler.github.io/sheets/
Apache License 2.0
921 stars 77 forks source link

No focus in InputEditText or unable to input anything #55

Closed egorikftp closed 3 years ago

egorikftp commented 3 years ago

Describe the bug Hello, I have faced several issues according to InputSheet functionality.

InputSheet().show(this) {
            style(getSheetStyle())
            title("Survey")
            with(InputEditText {
                required()
                label("My label")
                inputType(InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_FLAG_MULTI_LINE)
                defaultValue("test")
            })
}

https://user-images.githubusercontent.com/16294951/114083125-4a6c9800-98b7-11eb-9bc0-db177dd0c85b.mp4

InputSheet().show(this) {
            style(getSheetStyle())
            title("Survey")
            with(InputEditText {
                required()
                inputType(InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_FLAG_MULTI_LINE)
                defaultValue("test")
            })
}

https://user-images.githubusercontent.com/16294951/114146709-97388900-9920-11eb-9b32-7d3c58e7889a.mp4

InputSheet().show(this) {
            style(getSheetStyle())
            title("Survey")
            with(InputEditText {
                required()
                inputType(InputType.TYPE_CLASS_NUMBER or InputType.TYPE_TEXT_FLAG_MULTI_LINE)
                defaultValue("1000")
            })
}

https://user-images.githubusercontent.com/16294951/114146346-25f8d600-9920-11eb-80a3-c9c22f4c1822.mp4

Library Version: 2.1.4

Expected behavior User able to input text / digits and see the focus in the fields

Affected Device(s): Tested on Google Pixel 3a

maxkeppeler commented 3 years ago

Interesting. The focus is not behaving as it is supposed to. I guessed it had something to do that it is in the RecyclerView or ConstraintLayout and I found this: https://github.com/material-components/material-components-android/issues/1755

I used the latest versions of ConstraintLayout, but some kind of focus issue still exists. The only way I can fix ConstraintLayout's bug is by using android:layout_width="match_parent" on the TextInputLayout.