Android Button设置android:background=“@drawable/xxx“无效,无效...

问题描述:

Android Button 设置 android:background=“@drawable/xxx“ 无效,无效

Android Button设置android:background=“@drawable/xxx“无效,<item android:drawable=无效..._第1张图片" style="outline: none;;border:1px solid black;" width="650" height="337">

 解决方法:

找到 res/values/themes.xml 文件,将

parent="Theme.MaterialComponents.DayNight.DarkActionBar"

Android Button设置android:background=“@drawable/xxx“无效,<item android:drawable=无效..._第2张图片" style="outline: none;;border:1px solid black;" width="650" height="342">

 改为

parent="Theme.MaterialComponents.DayNight.NoActionBar.Bridge"

Android Button设置android:background=“@drawable/xxx“无效,<item android:drawable=无效..._第3张图片" style="outline: none;;border:1px solid black;" width="650" height="342">

问题解决!

Android Button设置android:background=“@drawable/xxx“无效,<item android:drawable=无效..._第4张图片" style="outline: none;;border:1px solid black;" width="444" height="484">

鸣谢:https://blog.csdn.net/zz00008888/article/details/120563791

你可能感兴趣的:(android)