I have the right to change certain image of the video I use the universal image loader girdview and do some work and such can show error,
03-17 not in December: SkImageDecoder ---: 49: 52.287: D / skia (21755):: Factory returned null December 3 to 17: 49 : 52.287: e / ImageLoader (21755): the image can not be decoded is [file: //// storage / Sdcard0 / Movies / Naruto episodes 55.mp4_270x270]
here's my code In the main class.
DisplayImageOptions defaultOptions = new DisplayImageOptionskBuilder () KcacheOnDisc (right) KcacheInMemory (right) KimageScaleType (ImageScaleTypekEXACTLY) Kdispleyr (new Fed Inbitmap Displeyr (300)). Build (); ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder (getApplicationContext ()) .defaultDisplayImageOptions (defaultOptions) .memoryCache (New WeakMemoryCache ()) .discCacheSize (100 * 1024 * 1024) .build (); . ImageLoader.getInstance () init (config);
Adeepitr the code,
String url = "/ storage / Sdcard0 / movies / Naruto episode 55.mp4"; Image Loader ImageLoader = ImageLoader.getInstance (); DisplayImageOptions option = New DisplayImageOptions.Builder (). CacheInMemory (true) .cacheOnDisc (true) .Setset View First (Load). ) .build (); // Start the Start Image View // Download the url image and display the image. Loader Display image ("file: ///" + url, img_btn, option);
The following code works fine but it takes some time.
Bitmap bitmap = Thnbnelultikskshm Veediotabnl (URL, 0); Img_btn.setImageBitmap (bitmap);
is a blank space in Github in your file name by this solution works, although I based on it have not yet tried:
if (file.exists ()) {final string uri = Uri.fromFile (file) .toString (); Last string decoded = Yuri decod (Yuri); ImageLoader.getInstance (). DisplayImage (decoded, see image); }
should work in accordance with your comments:
String url = "/ storage / Sdcard0 / Movies / Naruto episode 55.mp4"; ImageLoader.displayImage ("File: ///" + Uri.decode (url), img_btn, option);
No comments:
Post a Comment