0

I updated my project to androidx:

implementation 'androidx.appcompat:appcompat:1.0.0' 

Now the OutlinedBox from this approach with MaterialComponents is causing my app to crash.

style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" 

I could create the outline as a background with an editText background (this approach), but is there a way to do it with androidx and material components? Or perhaps I'm missing something else?

1 Answer 1

1

The style style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" is belonging to Material Components, you need to implement it by add this dependency: implementation 'com.google.android.material:material:1.1.0-alpha06'. And remember to inherit your app theme from Material Components too:

<style name="MyAppTheme" parent="Theme.MaterialComponents.Light.Bridge"> <!-- ... --> </style> 

For more detail, you can read this guide

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.