Defaultvalues describes how to define the default values for preference in XML.
<checkboxpreference Android:key= "Default_checkbox"Android:defaultvalue= "true"Android:title= "@string/title_checkbox_preference"android:summary= "@string/summary_checkbox_preference"/> <edittextpreference Android:key= "Default_edittext"Android:defaultvalue= "@string/default_value_edittext_preference"Android:title= "@string/title_edittext_preference"android:summary= "@string/summary_edittext_preference"Android:dialogtitle= "@string/dialog_title_edittext_preference"/> <listpreference Android:key= "Default_list"Android:defaultvalue= "@string/default_value_list_preference"Android:title= "@string/title_list_preference"android:summary= "@string/summary_list_preference"android:entries= "@array/entries_list_preference"android:entryvalues= "@array/entryvalues_list_preference"Android:dialogtitle= "@string/dialog_title_list_preference"/>
"Sailing plan 029" 2015 Sail plan Android Apidemo Devil's pace App->preferences->default values preferences default value