Android中preference标签的使用

  现在做公司任务的时候,经常会要去读Settings的源码,然后发现在xml文件中几乎全是用的preferenceScreen和preferenceCategory标签,很少有用布局和控件的,然后我就自己上网看了很多有关的资料,在此总结下。

  首先在res目录下,新建一个命名为xml的文件夹,然后建立一个aaa.xml文件,选择resource标签。

  先使用PreferenceCategory,代码如下

http://fl.365jia.cn/info/2277638.html
http://fl.365jia.cn/info/2277637.html
http://fl.365jia.cn/info/2277635.html
http://fl.365jia.cn/info/2277627.html
http://fl.365jia.cn/info/2277625.html
http://fl.365jia.cn/info/2277624.html
http://fl.365jia.cn/info/2277623.html
http://fl.365jia.cn/info/2277620.html
http://fl.365jia.cn/info/2277618.html
http://fl.365jia.cn/info/2277617.html
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4072
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4071
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4069
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4068
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4063
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4067
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4065
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4064
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4062
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4061
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4059
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4057
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4058
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4056
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4054
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4055
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4053
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4052
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4051
http://www.chaye315.cn/index.php?homepage=kmddyy17&file=news&itemid=4050
http://www.chaye315.cn/index.php?homepage=kmddyy18&file=news&itemid=4097
http://www.chaye315.cn/index.php?homepage=kmddyy18&file=news&itemid=4094
http://www.chaye315.cn/index.php?homepage=kmddyy18&file=news&itemid=4093
http://www.chaye315.cn/index.php?homepage=kmddyy18&file=news&itemid=4092
http://www.chaye315.cn/index.php?homepage=kmddyy18&file=news&itemid=4091
http://www.chaye315.cn/index.php?homepage=kmddyy18&file=news&itemid=4088
http://www.chaye315.cn/index.php?homepage=kmddyy18&file=news&itemid=4081
http://www.chaye315.cn/index.php?homepage=kmddyy18&file=news&itemid=4087
http://www.chaye315.cn/index.php?homepage=kmddyy18&file=news&itemid=4077
http://www.chaye315.cn/index.php?homepage=kmddyy18&file=news&itemid=4079
http://www.chaye315.cn/index.php?homepage=kmddyy18&file=news&itemid=4075
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52052.html
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52049.html
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52050.html
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52047.html
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52045.html
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52033.html
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52031.html
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52026.html
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52024.html
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52025.html
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52023.html
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52022.html
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52021.html
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52017.html
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52020.html
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52019.html
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52018.html
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52016.html
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52015.html
http://www.wangti360.net/com/kmddsbyy12/news/itemid-52014.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85344.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85343.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85342.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85340.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85339.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85337.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85336.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85335.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85334.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85332.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85331.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85330.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85329.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85327.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85326.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85325.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85323.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85322.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85321.html
http://www.maoyidi.com/m-kmddyy11/news/itemid-85320.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5490.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5489.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5488.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5487.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5486.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5485.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5484.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5483.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5482.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5481.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5480.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5479.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5478.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5477.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5476.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5475.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5474.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5473.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5472.html
http://www.start-tech.net/com/kmddyy11/news/itemid-5471.html
http://www.sn180.com/member/NewsView-1591265.html
http://www.sn180.com/member/NewsView-1591259.html
http://www.sn180.com/member/NewsView-1591252.html
http://www.sn180.com/member/NewsView-1591239.html
http://www.sn180.com/member/NewsView-1591230.html
http://www.sn180.com/member/NewsView-1591216.html
http://www.sn180.com/member/NewsView-1591211.html
http://www.sn180.com/member/NewsView-1591191.html
http://www.sn180.com/member/NewsView-1591164.html
http://www.gdzjdaily.com.cn/bxyy/clqj/0201503101157023.html
http://www.cqwb.com.cn/yst/jkys/9201503103341094.html
http://www.zhiyin.cn/yst/blys/a201503104920461.html
http://www.zhiyin.cn/yst/blys/a201503104920463.html
http://www.zhiyin.cn/yst/blys/a201503104920469.html
http://www.zhiyin.cn/yst/blys/a201503104920471.html
http://www.zhiyin.cn/yst/blys/a201503104920472.html
http://www.zhiyin.cn/yst/blys/a201503104920475.html
http://www.zhiyin.cn/yst/blys/a201503104920477.html
http://www.zhiyin.cn/yst/blys/a201503104920483.html
http://www.zhiyin.cn/yst/blys/a201503104920486.html
http://www.zhiyin.cn/yst/blys/a201503104920487.html
http://www.shenchuang.com/yst/xrkw/b201503103012615.html
http://www.shenchuang.com/yst/xrkw/b201503103012616.html
http://www.sxcm.net/bxyy/jkyy/b201503103012629.html
http://www.kaixian.tv/bxyy/ysmr/a201503104920554.html
http://www.sxcm.net/dele/2015/jkzc_0310/720198.html
http://www.sxcm.net/dele/2015/jkzc_0310/720200.html
http://www.sxcm.net/dele/2015/jkzc_0310/720201.html
http://www.sxcm.net/dele/2015/jkzc_0310/720203.html
http://www.sxcm.net/dele/2015/jkzc_0310/720204.html

时间: 2025-01-02 04:11:13

Android中preference标签的使用的相关文章

android中include标签使用详解

android中include标签是为了便于控件的覆用的一个很好解决方案. 但是也有一些需要注意的地方,下面是本人在项目中碰到过的一个问题,做此记录,便于以后查看. include标签用法. 1.新建一个xml文件,命名 head.xml head.xml文件内容如下: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.

Android中Preference的使用以及监听事件分析

> 在Android系统源码中,绝大多数应用程序的UI布局采用了Preference的布局结构,而不是我们平时在模拟器中构建应用程序时使用的View布局结构,例如,Setting模块中布局.当然,凡事都有例外,FMRadio应用程序中则使用了View布局结构(可能是该应用程序是marvel公司提供的,如果由google公司做,那可说不准).归根到底,Preference布局结构和View的布局结构本质上还是大同小异,Preference的优点在于布局界面的可控性和高效率以及可存储值的简洁性(每个

android中include标签的使用

转自:http://blog.sina.com.cn/s/blog_a364999b01017gxi.html android中include标签是为了便于控件的覆用的一个很好解决方案. 但是也有一些需要注意的地方,下面是本人在项目中碰到过的一个问题,做此记录,便于以后查看. include标签用法. 1.新建一个xml文件,命名 head.xmlhead.xml文件内容如下:<?xml version="1.0" encoding="utf-8"?>&

二十二、android中application标签说明

<application> <applicationandroid:allowClearUserData=["true" | "false"]android:allowTaskReparenting=["true" | "false"]android:backupAgent="string"android:debuggable=["true" | "false

Android中include标签的使用(打开引用布局,隐藏当前布局)

在开发app的时候,有时候一个布局会反复用到,可以把反复用到的布局单独写一个xml文件,什么时候用到就用includ标签引入xml 下面是我写的反复用到的一个xml,里面有2个button,一个TextView和一个ProgressBar layout_progress.xml <?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas

Android中include标签的使用及注意事项

前言 ??include标签可以实现在一个layout中引用另一个layout的布局,这通常适合于界面布局复杂.不同界面有共用布局的APP中,比如一个APP的顶部布局.侧边栏布局.底部Tab栏布局.ListView和GridView每一项的布局等,将这些同一个APP中有多个界面用到的布局抽取出来再通过include标签引用,既可以降低layout的复杂度,又可以做到布局重用(布局有改动时只需要修改一个地方就可以了). 使用方法 ??include标签的使用很简单,只需要在布局文件中需要引用其它布

Android中 include标签的使用

<?xml version="1.0" encoding="utf-8"?> <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" style="@style/StyleLayoutMain" mce_style="@style/StyleLayoutMain&

Android中&lt;original-package&gt;标签含义

在AndroidManifest.xml中,<original-package>与<manifest package=...>中的区别:<original-package>:应用源码所在包<manifest package=...>:应用运行时的进程名,同样也是R.java所在包名因此,上述两者名称可以不同,一般不写<original-package>,但若写,则需要注意以下几点:1.若<manifest package=...>与&

Android中时间标签起点

System.currentTimeMillis() 起点:January 1, 1970 00:00:00 UTC 单位:毫秒 SensorEvent中的timestamp 起点:开机 单位:纳秒