[Sony Cross-Device Development Themes and Apps] venkat kamesh:
Adding more Preference xml layouts

Apologize for my explanation :p

The Krypton.smali is linked with krypton_settings.xml where it acts as Dashboard Header over settings part

example.smali is a preferenceScreen Fragments which is linked to kryp_example.xml

So handlerpreferences can be run trough the example.smali fragment

How to add more Preference settings in krypton Dashboard preference

1. copy the example.smali and paste in it with different name like.. displaysettings.smali

2. Open that displaysetting.smali and replace all example to displaysettings

3. the same way create a xml ( kryp_example / kryp_displaysettings )

4. Now in displaysetting.smali change kryp_example to kryp_displaysettings and save

and in krypton_settings.xml add this

add this

<PreferenceScreen android:id="@+id/example_control" android:title="Basic" android:summary="example of basic pref" android:fragment="com.android.settings.kryp.settings.[COLOR="Red"]displaysettings[/COLOR] " />

So in this Way you can add as many you like to have

How Preferences Work:-

Here The Complete mod work on Key preferences

android:key

android:title = write your title

android:defaultValue = it can be "true" (on) "false" (off) / "1" (on) "0" (off) by default

android:summary = summary msg never change on action.. static msg shown

android:summaryOn = summary msg below shown when status is enabled

android:summaryOff = summary msg below shown when status is disabled

android:icon="@null" will show no icon , if its android:icon="@drawable/ic_settings_krypton" then add an icon in drawable in name of ic_settings_krypton.

android:max="24" will end max to 24 from 1

android:min="2" will start from 1 till max given

unitsRight="" units may be dp/ dip / sec Right meant will Show on right side of seek bar pref

unitsLeft="" units may be dp/ dip / sec Right meant will Show on left side of seek bar pref

Switch preference

<SwitchPreference android:title="Title" android:key="[COLOR="Red"]Main_key[/COLOR]" android:defaultValue="[COLOR="red"]true[/COLOR]" android:summaryOn="Shown" android:summaryOff="Hidden" />

CheckBox Preference

<CheckBoxPreference android:title="Title" android:key="[COLOR="Red"]Main_key[/COLOR]" android:defaultValue="false" android:summaryOn="Shown" android:summaryOff="Hidden" />

SeekBar Preference

<com.android.settings.kryp.settings.prefs.SeekBarPreference android:max="24" android:title="Title" android:key="[COLOR="Red"]Main_key[/COLOR]" android:defaultValue="1" min="1" unitsRight="" />

ListPreferences

<com.android.settings.kryp.settings.prefs.MyListPreference android:entries="@array/entries" android:title="Title" android:key="[COLOR="Red"]Main_key[/COLOR]" android:defaultValue="8" android:dialogTitle="Dialog title" android:entryValues="@array/values" />

ColorPreferences color Hex code ff737373 change as you need

<com.android.settings.kryp.settings.prefs.ColorPickerPreference android:title="Title" android:key="[COLOR="Red"]Main_key[/COLOR]" android:defaultValue="\#ff737373" alphaSlider="true" />

EditText Preferences

<com.android.settings.kryp.settings.prefs..MyEditTextPreference android:defaultValue="simpletext" android:key="[COLOR="Red"]Main_key[/COLOR]" android:title="Title" />

ohppppppppppppp.... done.!
Have fun guys