我有一个复选框,应用了一种样式。在 Lollipop 设备上,文本紧挨着复选框,但在 Lollipop 之前的设备上,文本距离很远。
我该如何解决这个问题?
<style name="Widget.CheckBox" parent="android:Widget.CompoundButton.CheckBox">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginLeft">8dp</item>
<item name="android:theme">@style/Theme.AppCompat.Light</item>
<item name="android:textColor">@color/primary_text</item>
</style>
Lollipop 之前的版本(特别是 4.1.1)
Lollipop ⇦ 这就是我希望它在所有设备上的样子
最佳答案
为了关闭线程,我把答案贴在这里:
解决方案是使用 parent="Widget.AppCompat.CompoundButton.CheckBox"
来支持较低的 API。
关于android - 如何修复 Lollipop 前设备上的复选框文本间距?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32419930/