Description: Unable to use/find Widget.MaterialComponents.TextInputLayout.*.ExposedDropdownMenu in style.xml, despite the fact when I search through the files, it exists inside the material library xml.
Expected behavior: I should be able to set my style parent to Widget.MaterialComponents.TextInputLayout.*.ExposedDropdownMenu
Source code: -
Android API version: min: 21, target: 29, compile: 29
Material Library version: 1.2.0-alpha01
Device: -
To help us triage faster, please check to make sure you are using the latest version of the library.
We also happily accept pull requests.
I think when the documentation says Widget.MaterialComponents.TextInputLayout.*.ExposedDropdownMenu, it means any *ExposedDropdownMenu from the styles. Using a specific style like Widget.MaterialComponents.TextInputLayout.FilledBox.ExposedDropdownMenu works fine.
While we're on this topic, I just wanna say that autocomplete for ExposedDropdownMenu styles doesn't work @wcshi
I think when the documentation says
Widget.MaterialComponents.TextInputLayout.*.ExposedDropdownMenu, it means any*ExposedDropdownMenufrom thestyles. Using a specific style likeWidget.MaterialComponents.TextInputLayout.FilledBox.ExposedDropdownMenuworks fine.
Yes I know what * means. I was trying to use Widget.MaterialComponents.TextInputLayout.FilledBox.ExposedDropdownMenu, but the autocomplete doesn't work and when I typed it manually, the linter complained that it doesn't exists. I did search through the material's style.xml and it's all there, I just can't use it.
Anyway, what I did was copy-pasted the content of the Widget.MaterialComponents.TextInputLayout.FilledBox.ExposedDropdownMenu to a separate local style, and it works just fine, but it's adding another thing to mark as a HACK on my code.
@wcshi this is not solved, btw, just workaround.
Android Studio 3.6.1
Build #AI-192.7142.36.36.6241897, built on February 27, 2020
Runtime version: 1.8.0_212-release-1586-b4-5784211 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.6
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 12
Registry: ide.new.welcome.screen.force=true
Non-Bundled Plugins: PythonCore
Maybe it's an android studio issue. In this build, the linter doesn't complain. But autocomplete doesn't work.
What do you mean by autocomplete not working? can you post your source code / a sample app?
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox.ExposedDropdownMenu" />
When I type @style/Widget.MaterialComponents.TextInputLayout., the autocomplete suggests the following:

When I keep typing *.FilledBox.Expo, the autocomplete doesn't show anything for ExposedDropdownMenu

This seems like an Android Studio issue that could be happening because of the cache. Can you try Invalidating the cache and restarting android studio to see if that issue is fixed?
edit: regarding the autocomplete, the styles are not here https://github.com/material-components/material-components-android/blob/master/lib/java/com/google/android/material/textfield/res-public/values/public.xml will work in fixing that.
However you should still be able to use the styles, AS will only show a warning.
Interestingly, android studio doesn't really complain when the correct style is written in full:

It just doesn't show the ExposedDropdownMenu styles in autocomplete. Hopefully, it'll get resolved when it's added in the public.xml as per your suggestion. Thanks for looking into it.
(Edit: btw, the problem here is the autocomplete. The styles work just fine)
Interestingly, android studio doesn't really complain when the correct style is written in full:
It just doesn't show the
ExposedDropdownMenustyles in autocomplete. Hopefully, it'll get resolved when it's added in thepublic.xmlas per your suggestion. Thanks for looking into it.(Edit: btw, the problem here is the autocomplete. The styles work just fine)
I'm embarrassed to admit this, but @rafid059 is correct, this is an autocomplete issue, the previous lint problem was because I keep typing ExposedDropDownMenu instead of ExposedDropdownMenu (notice the lower case d in down)
Most helpful comment
I think when the documentation says
Widget.MaterialComponents.TextInputLayout.*.ExposedDropdownMenu, it means any*ExposedDropdownMenufrom thestyles. Using a specific style likeWidget.MaterialComponents.TextInputLayout.FilledBox.ExposedDropdownMenuworks fine.