我有一个复选框,其中应用了一种样式。在棒棒糖设备上,文本就在复选框旁边,但在棒棒糖前设备上,文本很远。
我该如何解决这个问题?
<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>
Pre-Lollipop(特别是4.1.1)
Lollipop⇦这就是我想要在所有设备上查看的方式
答案 0 :(得分:1)
关闭帖子,我在这里发布答案:
解决方案是使用parent="Widget.AppCompat.CompoundButton.CheckBox"
来支持较低的API。