file can not is null.
This commit is contained in:
parent
2bac5352e8
commit
85a03bdd93
@ -269,12 +269,8 @@ public class TextNode extends ViewNode<TextView> {
|
|||||||
filePath = getContext().getCacheDir().getPath() + File.separator + "DoricTextFonts";
|
filePath = getContext().getCacheDir().getPath() + File.separator + "DoricTextFonts";
|
||||||
String fileName = URLEncoder.encode(type + "_" + identifier, "UTF-8");
|
String fileName = URLEncoder.encode(type + "_" + identifier, "UTF-8");
|
||||||
File file = createFile(fontData, filePath, fileName);
|
File file = createFile(fontData, filePath, fileName);
|
||||||
if (file == null) {
|
Typeface customFont = Typeface.createFromFile(file);
|
||||||
DoricLog.e("Error Font file load resource %s", resource.toString());
|
view.setTypeface(customFont);
|
||||||
} else {
|
|
||||||
Typeface customFont = Typeface.createFromFile(file);
|
|
||||||
view.setTypeface(customFont);
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
DoricLog.e("Error Font asset load resource %s", resource.toString());
|
DoricLog.e("Error Font asset load resource %s", resource.toString());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user