Tuesday, May 8, 2012

ImageView - how to inflate or add programatically?

I am programatically adding ImageView, but still I have no success. Is there any simple way, how to add ImageView into Activity programatically?



Thx



Edit:



I have tried this and it is not working.



                for(Bitmap b: photoField){
try{
Log.d("BIT", "Bitmapa "+b);
if(b!=null){
ImageView imv=new ImageView(PoiDisplay.this);
imv.setImageBitmap(b);
}
}catch (NullPointerException e) {
e.printStackTrace();
}
}




No comments:

Post a Comment