我從一個xml文件使用SherlockPreferenceActivity for Preference活動。下面的代碼:自定義操作欄Sherlock偏好活動列表視圖
public class Setting extends SherlockPreferenceActivity
{
protected void onCreate(Bundle paramBundle)
{
super.onCreate(paramBundle);
addPreferencesFromResource(R.xml.setting);
}
一切工作正常,但我需要留餘量,右是0dip(下圖)
我曾嘗試在ABS源代碼中找到,但未能將其自定義。任何人都有這樣做?
更新:我上傳更多細節圖像
Setting.xml的內容:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceCategory android:title="@string/system_setting" >
<CheckBoxPreference
android:defaultValue="true"
android:key="mode_on_off"
android:summaryOff="Sub Setting 1"
android:summaryOn="Sub Setting 1 On"
android:title="Setting 1" />
<CheckBoxPreference
android:defaultValue="true"
android:key="filter_on_off"
android:summaryOff="Sub Setting 2"
android:summaryOn="Sub Setting 2 On"
android:title="Setting 2" />
<CheckBoxPreference
android:defaultValue="false"
android:key="screen"
android:summaryOff="Sub Setting 3"
android:summaryOn="Sub Setting 3 on"
android:title="Setting 2" />
</PreferenceCategory>
</PreferenceScreen>
可能是我沒有寫清楚,我已經上傳細節圖像 – DzungPV 2013-05-09 16:08:25