设为首页 加入收藏

TOP

Android自定义属性之format介绍
2014-11-24 12:33:23 来源: 作者: 【 】 浏览:1
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-26 05:21:36)
·【C语言指针初阶】C (2025-12-26 05:21:33)
·C语言指针的定义和使 (2025-12-26 05:21:31)
·在 Redis 中如何查看 (2025-12-26 03:19:03)
·Redis在实际应用中, (2025-12-26 03:19:01)