Android 如何在CheckBoxPreference中设置图像
我想在首选项屏幕的复选框首选项中添加4个图像。 或 是否有任何方法可以将4个图像放在一行中,并在首选项屏幕的末尾复选框处。尝试以下方法: 自定义检查.xml文件Android 如何在CheckBoxPreference中设置图像,android,android-preferences,android-sharedpreferences,checkboxpreference,Android,Android Preferences,Android Sharedpreferences,Checkboxpreference,我想在首选项屏幕的复选框首选项中添加4个图像。 或 是否有任何方法可以将4个图像放在一行中,并在首选项屏幕的末尾复选框处。尝试以下方法: 自定义检查.xml文件 <?xml version="1.0" encoding="UTF-8"?> <CheckBox xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+android:id/checkbox" android:layout_w
<?xml version="1.0" encoding="UTF-8"?>
<CheckBox
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+android:id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:clickable="false"
android:button="@drawable/android_button"/>
布局
<CheckBoxPreference
android:key="@string/Drop_Option"
android:title="XXXXX"
android:defaultValue="true"
android:widgetLayout="@layout/custom_check"/>
请参阅下面的链接以获取帮助,它将为您提供想法-