material-components / material-components/material-components-android

[TextInputLayout] Add a dropdown to the left of input instead of icon

Open
#1,164 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting Design Feedback feature request Widget: TextField
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
In my UI design I need to add a dropdown to the left side of a TextInputLayout. Currently there is only support to add a drawable icon.

**Describe the solution you'd like**
It would be great to add another child to a `TextInputLayout`, name it `LeftDropdown`, for example.

```xml


```

The dropdown could receives its options like the Spinner view already does, through an Adapter.

**Describe alternatives you've considered**
My workaround was to add a transparent left drawable icon and the Spinner component on top of the TextInputLayout, like this:

```xml


```

**Additional context**
n/a

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing TextInputLayout API and the Spinner adapter usage described in the issue. Done would mean a supported dropdown can appear on the input's left side, accept adapter-provided options, and work through the requested XML structure.

Written by the indexing model from the issue text.

Assessment

Domain
mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.