2015-09-06 37 views
2

我有一個複選框,適用於它的樣式。在棒棒糖設備上,文本就在複選框旁邊,但是在棒棒糖設備上文本很遠。如何修復預棒棒糖設備上的複選框文本間距?

我該如何解決這個問題?

<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> 

前棒棒堂(特別是4.1.1)

enter image description here

棒棒糖⇦這是我希望它看起來在所有設備上

enter image description here

+2

嘗試使用parent =「Widget.AppCompat.CompoundButton.CheckBox」而不是 – Shahzeb

+0

修復它。謝謝。享受你的最愛:) – HaloMediaz

回答

1

剛剛關閉線程,我發佈答案在這裏:

解決方案是使用parent="Widget.AppCompat.CompoundButton.CheckBox"來支持較低的API。

+0

接受的答案:) – HaloMediaz

+0

謝謝。請享用 :) – Shahzeb

相關問題