문제

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?

도움이 되었습니까?

해결책

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);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top