Closed tcqq closed 6 years ago
The AppCompatButton
might not be the best solution as the doc says:
This will automatically be used when you use
Button
in your layouts and the top-level activity / dialog is provided by appcompat. You should only need to manually use this class when writing custom views.
What about the new MaterialButton
?
Using MaterialButton
requires support library upgrade to "28.0.0-alpha3" version.
What material components version (or design support lib) do you use? I tried with 28.0.0-alpha1 on API 26 and 28 but cannot reproduce the button styling issue with the sample app using Theme.MaterialComponents.Light
.
No need to add a material component library, change design support lib to "28.0.0-alpha3" version.
compileSdkVersion: android-P
supportVersion: 28.0.0-alpha3
Found a better solution. The problem was that the buttonBarStyle
and related attributes were not set because they are defined in the alertDialogTheme
that is not applied currently to the layout. Adding android:theme="?alertDialogTheme"
to the ScrollView
fixes it.
Fixed in v1.0.7-alpha3 (technically in alpha1 but that one didn't produce this error).
Fixed because theme using MaterialComponents causes button style error.
Before fix:
After fix: