material-components / material-components/material-components-android
[TextField] Ripple effect on exposed dropdown menu's button is missing when inputType is "none"
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
Description: When a TextInputLayout is configured with exposed dropdown menu and android:inputType="none" is applied to make it non-editable, the touch ripple effect on the menu button fails to render.
Expected behavior:
Source code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.Material3.TextInputLayout.FilledBox.ExposedDropdownMenu"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:hint="Label">
<AutoCompleteTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="none"
app:simpleItems="@array/simple_items" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
Minimal sample app repro: The issue is also reproducible in the Catalog app under the "Exposed Dropdown Menu Demo."
Android API version: 36, 37
Material Library version: first appeared in 1.14.0-alpha04
Device: Any
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with catalog/java/io/material/catalog/textfield/TextFieldExposedDropdownMenuDemoFragment.java and reproduce the exposed dropdown behavior with android:inputType="none" on API 36 or 37. Trace the TextInputLayout and AutoCompleteTextView interaction to identify why the menu button ripple is absent; done means the ripple renders in the minimal sample and Catalog demo without regressing editable dropdowns.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100