设为首页 加入收藏

TOP

Android自定义属性之format介绍
2014-11-24 12:33:23 来源: 作者: 【 】 浏览:0
Tags:Android 定义 属性 format 介绍

1. reference:参考某一资源ID。


(1)属性定义:



background" format = "reference" />



(2)属性使用:



android:layout_width = "42dip"
android:layout_height = "42dip"
android:background = "@drawable/图片ID"


/>


2. color:颜色值。


(1)属性定义:



textColor" format = "color" />



(2)属性使用:



android:layout_width = "42dip"
android:layout_height = "42dip"
android:textColor = "#00FF00"


/>


3. boolean:布尔值。


(1)属性定义:



focusable" format = "boolean" />



(2)属性使用:



android:layout_width = "42dip"
android:layout_height = "42dip"


android:focusable = "true"


/>


4. dimension:尺寸值。


(1)属性定义:



layout_width" format = "dimension" />



(2)属性使用:



android:layout_width = "42dip"
android:layout_height = "42dip"


/>


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Android之用PopupWindow实现弹出l.. 下一篇Linux下的nandflash驱动分析(2)..

评论

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

·用 C 语言或者限制使 (2025-12-25 08:50:05)
·C++构造shared_ptr为 (2025-12-25 08:50:01)
·既然引用计数在做 GC (2025-12-25 08:49:59)
·Java 编程和 c 语言 (2025-12-25 08:19:48)
·. net内存管理宝典这 (2025-12-25 08:19:46)