Material Design —— Error inflati

2019-11-05  本文已影响0人  ProgrammingGuy

导入Material Design的依赖包后,在xml中将Button替换为MaterialButton,直接运行会出现error inflating MaterialButton的错误,原因是未将整个应用主题设置为Material Design,在styles.xml中将AppTheme改为

<style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
上一篇 下一篇

猜你喜欢

热点阅读