首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >getColor(int id)和Android 6.0 Marshmallow(API 23)?

getColor(int id)和Android 6.0 Marshmallow(API 23)?

提问于 2017-12-18 10:33:41
回答 2关注 0查看 463

getColor(int id)在Android 6.0 Marshmallow(API 23)上弃用?

该Resources.getColor(int id)方法已被弃用。

代码语言:txt
复制
代码语言:txt
复制
@ColorInt
代码语言:txt
复制
@Deprecated
代码语言:txt
复制
public int getColor(@ColorRes int id) throws NotFoundException {
代码语言:txt
复制
    return getColor(id, null);
代码语言:txt
复制
}

我要怎么做?

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档