设为首页 加入收藏

TOP

Android开发教程:View Tag 的使用
2014-11-24 14:36:55 来源: 作者: 【 】 浏览:1
Tags:Android 开发 教程 View Tag 使用

发现Tag在View中还是很有作用的属性,API中这样描述的:


Tags


Unlike IDs, tags are not used to identify views. Tags are essentially an extra piece of information that can be associated with a view. They are most often used as a convenience to store data related to views in the views themselves rather than by putting them in a separate structure.


Tag不像ID是用标示view的。Tag从本质上来讲是就是相关联的view的额外的信息。它们经常用来存储一些view的数据,这样做非常方便而不用存入另外的单独结构。


下面这个例子是从eoe中看到的,给我很大启发:


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Android ListView例子详解 下一篇Android自动补全教程

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: