Question

during

Bitmap b1 = ThumbnailUtils.createVideoThumbnail(pathName1,
                    MediaStore.Images.Thumbnails.MINI_KIND); 

and Bitmap bmp1 = Bitmap.createScaledBitmap(b1, nWidth, nHeight, true); and imageView1.setImageBitmap(bmp1);

When is the right time to use Thread in creating Bitmap? And when to used the View.post?

Was it helpful?

Solution

You can use next methods in thread.

Bitmap b1 = ThumbnailUtils.createVideoThumbnail(pathName1,
                    MediaStore.Images.Thumbnails.MINI_KIND);
Bitmap bmp1 = Bitmap.createScaledBitmap(b1, nWidth, nHeight, true);

And set image in main thread

imageView1.setImageBitmap(bmp1);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top