【发布时间】:2012-08-02 19:43:15
【问题描述】:
可能重复:
Change icons of checked and unchecked for Checkbox for Android
customize check box preference
有没有办法自定义PreferencesActivity中元素的样式?
我只能更改颜色文本、背景等。
我还想更改CheckBoxPreference等中的复选标记和单选按钮样式。
我对 API8 或更高版本感兴趣。
感谢您的帮助!
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<CheckBoxPreference
android:defaultValue="true"
android:key="vibrate"
android:summary="summary"
android:title="Some title"
android:widgetLayout="@layout/custom_checkbox" />
<CheckBoxPreference
android:defaultValue="true"
android:key="autorotate"
android:summary="summary"
android:title="auto rotate" />
</PreferenceScreen>
【问题讨论】:
标签: android checkbox preferences radio preferencescreen