'Android Exposed Dropdown causes exception

I need to add a drop down to my app, which is running on the AppCompat theme, since we are not using the Material design components, but rather have our own design for buttons, etc.

For a simple feature, I need to use a dropdown and here I think the Exposed drop down from the Material design theme would work nicely.

However, if I'm not specifically using the MaterialComponents theme in my styles, the app will crash whenever I try to use the style on the TextInputLayout.

Is there a way of using the nice Exposed dropdown from MaterialComponents without using the entire theme (as this overrides all colors for buttons and such)? Or maybe just a simple way of getting a nice and simple dropdown otherwise. Spinners seem kinda hard to work with..

Cheers.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source