[ExposedDropDownMenu] Changes keyboard input type even if non-editable
See original GitHub issueDescription: I have a non-editable ExposedDropDownMenu (country
) and a regular TextInputLayout below it (phone
), with inputType="phone"
. When phone
input layout is focused, the keyboard is open and shows big digit keys. I tap on the country
dropdown, and the keyboard remains open, but suddenly changes to regular text input type.
Expected behavior: The keyboard should hide or maybe stay in the same input type as before the click on dropdown menu.
Source code: https://gist.github.com/alaershov/e85222cdddef99b14059088247655615
Android API version: 29
Material Library version: 1.1.0, 1.2.0-alpha05
Device: Nokia 6.1
Issue Analytics
- State:
- Created 3 years ago
- Reactions:12
- Comments:5 (1 by maintainers)
Top Results From Across the Web
"inputType="none" doesn't work with Material Components ...
I'm trying do make a non-editable exposed dropdown menu, following the guide under "Implementing an exposed ...
Read more >Source Code for ExposedDropdownMenu.kt - AndroidX Tech
If the text field input is used to filter results in the menu, ... called when the exposed dropdown menu is clicked and...
Read more >AutoCompleteTextView - Android Developers
android:textIsSelectable, Indicates that the content of a non-editable text can ... This view is invisible, but it still takes up space for layout...
Read more >Text fields - Material Design
If any specific changes should be done when the edit text is attached (and ... TransformationMethod is still PasswordTransformationMethod. Because of
Read more >type - Cypress Documentation
Cypress will fire input only if typing that key modifies or changes the value of the element. Event Cancellation. Cypress respects all default...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Problem 1: Hide keyboard when clicked on ExposedDropDownMenu if
inputType
isnone
and is supposed to work like a non-editable dropdown menu. Solution: Just havinginputType = none
in xml doesn’t work. In addition to that, you need to updateinputType
in code too.Problem 2: Hide keyboard when focus from other TextInputLayout changes to the ExposedDropDownMenu Solution: Add a view focus change listener on the dropdown menu and hide the keyboard
Problem 1 from above comment is fixed in 1.2.0-alpha06 with MaterialAutoCompleteTextView. But the problem 2 is still there.