1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2008 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 --> 16 17 <!-- This is an advanced example showing the custom preference types and manually handling 18 preference clicks. --> 19 <PreferenceScreen 20 xmlns:android="http://schemas.android.com/apk/res/android"> 21 22 <!-- My custom preference type. This just replaces the actual widget 23 portion of the preference, if the whole preference wanted to be 24 replaced we would use the layout attribute instead of the widgetLayout 25 attribute. --> 26 <com.example.android.apis.preference.MyPreference 27 android:key="my_preference" 28 android:title="@string/title_my_preference" 29 android:summary="@string/summary_my_preference" 30 android:defaultValue="100" /> 31 32 <CheckBoxPreference 33 android:key="advanced_checkbox_preference" 34 android:title="@string/title_advanced_toggle_preference" 35 android:summaryOn="@string/summary_on_advanced_toggle_preference" 36 android:summaryOff="@string/summary_off_advanced_toggle_preference" /> 37 38 </PreferenceScreen> 39