TypedArray对应的attrs属性获取!

2017-09-17  本文已影响0人  天乡墨客

attrs中的format属性:TypedArray对应方法:返回:备注
reference:getInt:int
color:getColor:int
boolean:getBoolean:boolean
dimension:getDimension:float
float:getFloat:float
integer:getInteger,getInt:Integer,int
string:getString:String:必须是资源文件中的字符串
fraction:getFraction:float
enum:getInt,getInteger,getFloat,getString:int,Integer,float,String:返回的全是value的值
flag:getInt,getFloat,getString:int,float,string:返回value值的或运算值
混合类型:根据不能的属性而定:根据不能的属性而定:部分属性混合报错

上一篇 下一篇

猜你喜欢

热点阅读