为什么我需要使用按钮样式,而不是机器人:按钮样式与API级别16? [英] Why do I need to use buttonStyle instead of android:buttonStyle with API level 16?
本文介绍了为什么我需要使用按钮样式,而不是机器人:按钮样式与API级别16?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我努力使与API级别16(与API级22是工作就像一个魅力)按钮的工作作风。我解决了它替换的android:按钮样式
与按钮样式
I was struggling to make a button style work with API level 16 (with API level 22 was working like a charm). I solved it replacing android:buttonStyle
with buttonStyle
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- <item name="android:buttonStyle">@style/button</item> -->
<item name="buttonStyle">@style/button</item>
</style>
现在它的工作原理与两个API的水平,但现在我的问题是:
为什么会出现这种情况?
Now it works with both API levels, but now my question is: Why is this happening?
推荐答案
由于
item name="buttonStyle"
是当前您的主题支持支持库的兼容性。它也可以用来定义上类似动作条 HTTPS等物品://开发商.android.com /国际/高/培训/基础/动作条/ styling.html
我建议您同时定义了它,使它的设备兼容范围非常广
I suggest you define both of it to make it compatible to very wide range of devices
这篇关于为什么我需要使用按钮样式,而不是机器人:按钮样式与API级别16?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文