美文网首页
TypedArray对应的attrs属性获取!

TypedArray对应的attrs属性获取!

作者: 天乡墨客 | 来源:发表于2017-09-17 21:50 被阅读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值的或运算值
    混合类型:根据不能的属性而定:根据不能的属性而定:部分属性混合报错

    相关文章

      网友评论

          本文标题:TypedArray对应的attrs属性获取!

          本文链接:https://www.haomeiwen.com/subject/ppimsxtx.html