如何在Android的使用android.graphics.drawable.bitmapdrawable? [英] How to use android.graphics.drawable.bitmapdrawable in android?

查看:445
本文介绍了如何在Android的使用android.graphics.drawable.bitmapdrawable?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我用一个函数来创建的ImagePath绘制,我也得到:
android.graphics.drawable.bitmapdrawable@numbers

so I have used a function to create drawable from imagepath, and I get: android.graphics.drawable.bitmapdrawable@numbers

我如何使用它?可以将其用作ID?
例如与正常绘制我会写这样的:
findViewById(R.drawable.name);
可我同样在这里使用?

How do I use it? can it be used as ID? for example with normal drawable I would write like: findViewById(R.drawable.name); can I use same here?

findViewById(android.graphics.drawable.bitmapdrawable@numbers);

findViewById(android.graphics.drawable.bitmapdrawable@numbers);

感谢您。

推荐答案

您不能使用findViewById(R.drawable.name),你必须使用R.id.someId

you cannot use findViewById(R.drawable.name), you have to use R.id.someId

这篇关于如何在Android的使用android.graphics.drawable.bitmapdrawable?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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