2012-05-12 136 views
0

我有基本类被称为常见活动,因为我在每个activity.By使用下面的代码返回字符串。如何动态添加图像android

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; 
    } 

我该怎么做这个对于图像查看。

对不起,我的英文。

Thansks, Nikhil。

+0

没有得到我不需要这样的 –

回答

1

您需要使用位图对象,如这样的:

Bitmap b = getBitmapImage(); 
ImageView img = (ImageView)findViewById(R.id.imgView); 
img.setImageBitmap(b); 
+0

然后,你需要解释一下你所需要的。 –

+0

问题 –