我想打电话从方法的位图在我的主类和我不确定如何做到这一点 -如何调用另一个类的方法中定义的位图?
我有一个方法:
private void detectFaces() {
Bitmap bitmap565 = Bitmap.createBitmap(width, height,
Config.RGB_565);
if (facesFound < 1) {
Intent k = new Intent(main.this, False.class);
startActivity(k);
,在我False.class我:
super.onCreate(savedInstanceState);
setContentView(R.layout.detectfalse);
ImageView imageView = (ImageView) findViewById(R.id.false_view);
TextView textView = (TextView) findViewById(R.id.badPicText);
textView.setText(R.string.noFace);
imageView.setImageBitmap(bitmap565);
所以基本上,我如何将位图放在我的主类中的detectFaces方法中,并在我的false类中将其作为位图传递给imageview中的位图?
谢谢!
这不是它应该完成的方式,但为了回答,只需将'bitmap565'设为'public static'变量即可。然后,您可以使用'Main.bitmap565'访问它。 – st0le 2010-11-19 18:57:45