5
style
을 새로 작성하여 ListPreference
의 기본 이미지를 변경하고 싶습니다.변경 목록 참고 스타일
나는 상속 Widget.CompoundButton.CheckBox
에 의해 CheckBoxPreference
새로운 android:button
설정으로했다,하지만 난 ListPreference
에 그것을하는 방법을 모르겠어요.
style
을 새로 작성하여 ListPreference
의 기본 이미지를 변경하고 싶습니다.변경 목록 참고 스타일
나는 상속 Widget.CompoundButton.CheckBox
에 의해 CheckBoxPreference
새로운 android:button
설정으로했다,하지만 난 ListPreference
에 그것을하는 방법을 모르겠어요.
WidgetLayout 속성을 사용하여 환경 설정에 아이콘을 추가 할 수 있습니다.
예 :
<EditTextPreference
android:defaultValue=""
android:dialogTitle="@string/mode_name"
android:key="mode_name"
android:order="0"
android:summary=""
android:title="@string/mode_name"
android:widgetLayout="@layout/mode_item_preference"
/>
그리고 mode_item_preference.xml
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/app_name"
android:focusable="false"
android:src="@drawable/delete" />