attrs.xml文件,但里面的format中的值写什么?官方DOC有表吗? 请教各位前辈,继承自View的自定义控件如何增加自定义的属性?baidu了一下,需要添加attrs.xml文件,但里面的format中的值写什么?官方DOC有表吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?xml version="1.0" encoding="utf-8" ?> <resources> <declare-styleable name="CwjView"> <attr name="age" format="integer" /> <attr name="city" format="string" /> <attr name="university" format="string" /> </declare-styleable></resources>http://www.android123.com.cn/androidkaifa/591.html format 暂时找到的有color,integer,float,boolean,reference, string,dimension,enum如果还有其他的请添加到此~~~ /framework/base/tools/aapt/ResourceTable.cppstatic status_t compileAttribute 这个函数解析的 很简单,在eclipse里面用 鼠标指着xml里的属性,就会出现提示, 有的出现 [boolean],有的出现[dimension]等。这个就是format了。 困扰好几周了:webservice与android数据交互问题 新的的sdk java 正则表达式 使用registerForContextMenu方法注册菜单。但是不能工作。 求助!android2.1 移植 如何使用3G数据网络? Android 布局问题高分求教 android MediaPlayer 怎么使用fifo播放文件 android怎么获取wifi接入点详细信息 如何将YUV420格式的图表转成黑白图 求几个Android多媒体框架下载地址? NDK方式下openGL绑定纹理出错 类似wifi设置页面的实现
<resources>
<declare-styleable name="CwjView">
<attr name="age" format="integer" />
<attr name="city" format="string" />
<attr name="university" format="string" />
</declare-styleable>
</resources>http://www.android123.com.cn/androidkaifa/591.html
如果还有其他的请添加到此~~~