Im trying to create a Bitmap from a Png file stored on the SD card and then set that Bitmap in an imageView. But its not working.
Here\'s the code:
i
You can't..
ImageView BackGround=(ImageView)findViewById(R.id.imageView1);
BackGround.setImageBitmap(BckGrnd);
How can you get the reference of ImageView
in non activity class Getbackground
?
You can only update UI component in MainUI Thread and if its in non Activity class then using reference (Context) of that calling activity class only.
So put this code in your Activity class after Getbackground completes.