I use SherlockPreferenceActivity for Preference activity from a xml file. Code below:
public class Setting extends SherlockPreferenceActivity
{
protected void onCreate(Bundle paramBundle)
{
super.onCreate(paramBundle);
addPreferencesFromResource(R.xml.setting);
}
Everything work fine but i need the margin left and right is 0dip (the pic below)
I had try to find in ABS source code but failed to custom it. Anyone has do it before?
Update: I upload more detail image
setting.xml content:
<?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>