Android Resource IDs

后端 未结 3 844
眼角桃花
眼角桃花 2021-02-06 20:35

I\'m retrieving custom Resource IDs from a custom xml view type. I\'m asked to specify a default int value for the retrieval and was wondering what is the range of IDs? Are they

3条回答
  •  佛祖请我去吃肉
    2021-02-06 21:15

    According to the documentation, Resources.getIdentifier()

    Returns 0 if no such resource was found. (0 is not a valid resource ID.)

    so you can use 0.

提交回复
热议问题