ExternalResources.java 文件源码

java
阅读 41 收藏 0 点赞 0 评论 0

项目:external-resources 作者:
/**
 * Return a boolean associated with a particular resource ID. This resource can come from
 * resources you provided via the URL or via default resources.
 *
 * @param resId The desired resource identifier, as generated by the aapt
 * tool. This integer encodes the package, type, and resource
 * entry. The value 0 is an invalid identifier.
 * @return Returns the boolean value contained in the resource.
 * @throws NotFoundException Throws NotFoundException if the given ID does not exist.
 */
public boolean getBoolean(@BoolRes int resId) throws NotFoundException {
  String key = getApplicationResourceEntryName(resId);

  if (null == key) {
    throw new NotFoundException("Boolean resource with resId: " + resId);
  }

  return getBoolean(key);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号