是否可以从资产文件夹加载可绘制对象? [英] Is it possible to load a drawable from the assets folder?

查看:33
本文介绍了是否可以从资产文件夹加载可绘制对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你能从 assets(不是 drawable 文件夹)文件夹中的子目录加载一个 drawable 吗?

Can you load a drawable from a sub directory in the assets (not the drawable folder) folder?

推荐答案

希望对您有所帮助:

Drawable d = Drawable.createFromStream(getAssets().open("Cloths/btn_no.png"), null);

这篇关于是否可以从资产文件夹加载可绘制对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆