typearray中的整数值.getType(int index)对应于
What do the integer values from TypedArray.getType(int index) correspond to?
在android中有一个TypedArray对象getType(int index)
的方法,它返回一个int,如android文档
在文档和我的研究中,我找不到返回的整数对应的是什么。
有人知道吗?
TypedArray object getType(int index)
method返回指定索引处的属性类型。https://developer.android.com/reference/android/content/res/TypedArray.html方法(int)
例如
如果在xml中使用string作为数据类型,那么如果该数据类型为string,则返回的int值将为3。ie TYPE_STRING,
,如果数据类型为float,则返回值为4如果数据类型为float,即TYPE_FLOAT
有关更多详细信息,请参阅https://developer.android.com/reference/android/util/TypedValue.html查找以前缀TYPE_
开头的常量希望它澄清!!
相关文章:
- 在提升multi_index容器中,是否定义了"default index"?
- 为什么在全局范围内使用"extern int a"似乎不行?
- int(c) 和 c-'0' 之间的区别。C++
- 从"int*"强制转换为"unsigned int"会丢失精度错误
- 为什么野牛仍在使用"int yylex(void)",却找不到"int yylex(YYS
- 有符号的int和int-有没有一种方法可以在C++中区分它们
- 请解释这句话(cout<<1+int((a<b)^((b-a)&1) )<<endl
- 是否可以从int转换为enum类类型
- 不能在初始值设定项列表中将非常量表达式从类型 'int' 缩小到'unsigned long long'
- 向量 <int> a {N, 0} 和 int arr a[N] = {0} 的时间复杂度有什么区别
- 'short int'持有的值溢出,但"自动"不会溢出?
- 如何在C++中将一个无符号的 int 转换为两个无符号的短裤?
- 调用'begin(int [n])'没有匹配函数
- 没有显式声明的int[]中的foreach
- 在c++中访问int到类对象的映射时出错
- 为什么我无法更改"set<set>"循环中的值<int>
- 代码中的"vector<<int>vector>&index"是什么意思?
- CStringArray::GetAt(int index) 返回一个 const. 为什么?
- QVector<int>[index] 返回另一个 QVector?
- typearray中的整数值.getType(int index)对应于