Hi~
I'm trying to periodically change image data in ImageView in the
thread routine
but when I put this code in the tread routine, program is killed.
imgView.setBitmap(bm);
here is my thread code
...
private byte[] imgData;
private Bitmap bm;
new Thread (new Runnable()
{
public void run()
{
while(!isStop){
imgData = getImage();
bm = BitmapFactory.decodeByteArray(imgData,
0,imgData.length);
imgView.setBitmap(bm); --> This caused error!!
}
}
}).start();
...
imgData is receiving jpeg image data from somewhere.
Outside thread routine, image data is displayed well.
If above is impossible, are there any other ways to periodically image
data refreshing on screen ?
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---