2016-08-19 77 views
0
<CheckBox 
android:id="@+id/CheckBox01_district" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:gravity="end" 
android:padding="10dp" 
android:layout_marginRight="6sp" 
android:focusable="false" /> 

我已經寫了這個複選框。它在Kitkat中表現出色,但在棉花糖顯示褪色。複選框顯示褪色棉花糖

+0

改變你的Android:layout_marginRight從SP到DP。檢查[這裏](http://stackoverflow.com/questions/2025282/what-is-the-difference-between-px-dp-dip-and-sp-on-android) –

+0

它不正確的答案 –

+0

它是一個建議不是答案 –

回答

0

您應該使用android.support.v7.widget.AppCompatCheckBox代替CheckBox的:

<android.support.v7.widget.AppCompatCheckBox 
android:id="@+id/CheckBox01_district" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:gravity="end" 
android:padding="10dp" 
android:layout_marginRight="6sp" 
android:focusable="false"/> 
+0

它仍然沒有顯示。褪色棉花糖 –