安卓系统设置选项的框架。
发布时间:2015-12-03 18:01:01
首先在res文件中创建一个 1 <??> 2 <PreferenceScreen ="http://schemas.android.com/apk/res/android" > 3 4 <PreferenceCategory ...
首先在res文件中创建一个
1 <??> 2 <PreferenceScreen ="http://schemas.android.com/apk/res/android" > 3 4 <PreferenceCategory android:title="系统信息" > 5 <EditTextPreference 6 android:defaultValue="机主姓名" 7 android:icon="@drawable/ic_launcher" 8 android:key="edit_text_key_1" 9 android:summary="木子小新"10 android:title="机主姓名" />11 12 <ListPreference13 android:dialogIcon="@drawable/ic_launcher"14 android:dialogTitle="城市区号"15 android:entries="@array/city"16 android:entryValues="@array/city_quhao"17 android:icon="@drawable/ic_launcher"18 android:key="listpreference"19 android:title="区号" />20 </PreferenceCategory>21 <PreferenceCategory android:title="系统设置" >22 <Preference23 android:icon="@drawable/bokeyuan"24 android:summary="http://www.cnblogs.com/labixiaoxin/"25 android:title="机主博客" >26 <intent27 android:action="android.intent.action.VIEW"28 android:data="http://www.cnblogs.com/labixiaoxin/" />29 </Preference>30 31 <SwitchPreference32 android:icon="@drawable/wifi"33 android:key="wifi"34 android:title="wifi开关" />35 <SwitchPreference36 android:icon="@drawable/lanya"37 android:key="lanya"38 android:title="蓝牙开关" />39 40 <CheckBoxPreference41 android:defaultValue="true"42 android:icon="@drawable/xuanzhuahn"43 android:key="checkbox_key_xuanzhuan"44 android:title="旋转" />45 46 <RingtonePreference47 android:icon="@drawable/ring"48 android:key="ring"49 android:title="**" />50 </PreferenceCategory>51 52 <PreferenceScreen53 android:icon="@drawable/ic_launcher"54 android:key="preference_screen_2_key"55 android:persistent="false"56 android:title="其他设置" >57 <CheckBoxPreference58 android:defaultValue="true"59 android:icon="@drawable/ic_launcher"60 android:key="checkbox_key_wangluo"61 android:summary="网络已经开启"62 android:title="网络" />63 </PreferenceScreen>64 65 </PreferenceScreen>
原标题:安卓系统设置选项的框架。
关键词:
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。