小编Ali*_*ari的帖子

从资源中获取字体在 Java 中存在错误 - Android

我编写代码并使用 CompatResources 获取字体并将其设置为 TypeFace 以查看错误 Fabric.io 报告了一些关于它的崩溃。

由 android.content.res.Resources$NotFoundException 导致无法检索字体资源 ID #0x7f090000。

这是我的代码:

tfFontIcon = ResourcesCompat.getFont(mContext, R.font.font_icon);
Run Code Online (Sandbox Code Playgroud)

谢谢你的帮助。

java resources fonts android typeface

5
推荐指数
1
解决办法
1055
查看次数

标签 统计

android ×1

fonts ×1

java ×1

resources ×1

typeface ×1