0

我有称为通用活动的基类,因为我在每个活动中都返回字符串。通过使用以下代码。

txtHeader = (TextView)findViewById(R.id.txtHeaderText);
        txtHeader.setText(getScreenHeader());

我正在返回空字符串

protected String getScreenHeader(){
        return "";
    }

在另一项活动中,我将以这种方式进行。

public  final static String SCREEN_NAME = "Dashboard";
@Override
    protected String getScreenHeader() {
        return SCREEN_NAME;
    }

对于图像视图,我该怎么做。

对不起我的英语不好。

谢谢,尼基尔。

4

1 回答 1

1

您将需要使用这样的 Bitmap 对象:

 Bitmap b = getBitmapImage();
 ImageView img = (ImageView )findViewById(R.id.imgView);
 img.setImageBitmap(b);
于 2012-05-12T08:44:23.693 回答