FAQ Database Discussion Community


Get correct File uri from file path in sdcard when using in Universal Image Loader

android,image,video,universal-image-loader
Currently, I use the [Universal Image Loader] library to load some files from the sd card. I want to get the following URI from a file path: file:///mnt/sdcard/image.png I already tried this way to get file URI: Uri uri = Uri.fromFile(mAlFileList.get(i)); But the file URI already modified to file:///mnt/sdcard/%5B40k%5D/20141014_232337.jpg When...

Android: Universal Image Loader and the blank space issue

java,android,html,universal-image-loader
i have a string that contains HTML contents (text and images), i'm using the UIL to translate the <img> html tags to be displayed correctly in a TextView, each image in its original place in the paragraph. Everything works fine except that i get a blank extra space at the...

Universal Image Loader - Use same image in multiple views

android,imageview,universal-image-loader
I'm using Universal Image Loader to load images from a backend to display user images in a list; however, if the icon shows up multiple times, the Universal Image Loader doesn't fill out all the views. [User Image 1] - No image [User Image 1] - No Image [User Image...

Universal Image Loader - listView was cleared

android,listview,universal-image-loader
A few hours ago, I asked about AUIL call too many getView(). (Universal Image Loader - call too many getView()) By answers, I solve the problem that getView() was called too many times. However, I've still have a problem. When the activity was started, I can see the list. However,...

Enabling zoom on viewpager using Universal Image Loader?

android,android-activity,android-viewpager,universal-image-loader
I have developed a gallery app in android.I am fetching the images form server & displaying on the viewpager.I have used universal image loader for this purpose.My viewpager works fine.But now i want to add the zoom feature such as zoomin/zoom out/pinch zoom.So for purpose i have replaced the image...

HttpURLConnection failes with NullPointerException on Lollipop

android-5.0-lollipop,universal-image-loader,okhttp
I noticed that sometimes, not sure in which conditions, while downloading an image using Universal-Image-Loader (https://github.com/nostra13/Android-Universal-Image-Loader), I get the following NullPointerException: E/ImageLoader(27386): Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference E/ImageLoader(27386): java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference E/ImageLoader(27386): at...

how to display video thumbnails using Universal Image Loader

android,thumbnails,universal-image-loader
I need to display video thumbnails using Universal Image Loader , any help pleaz, i can get the thumbnail bitmap from this Bitmap b= ThumbnailUtils.createVideoThumbnail( "",MediaStore.Images.Thumbnails.MICRO_KIND); but how display it in imageloader because if i display the bitmap the adapter will make the mobile slow,...

Clear cache of UIL library

android,universal-image-loader
I am using universal image loader library for loading the images in my listview. I want to clear the cache for all the images at once. I know how to do it for one image at a time. MemoryCacheUtils.removeFromCache("file://"+path, ImageLoader.getInstance().getMemoryCache()); DiskCacheUtils.removeFromCache("file://"+path, ImageLoader.getInstance().getDiskCache()); How can I do this?...

Universal Image Loader with JSON Data instead of constant data

android,json,universal-image-loader
I have a gridview to display images from the image urls. I used universal image loader to display&cache images. There is a class in the library Constant which has image urls. I want to get the urls with json but I didn't do that and getting null pointer exception. Please...

update universal imageloader cache

android,imageview,universal-image-loader
I have used universal image loader in my application. It works perfectly. My issue is that my web url remains constant and the image at that url gets changed. So every time it takes image from cache as url is not changed. I want that it should display image from...

Image not changing in ImageView

android,universal-image-loader,picasso
I am making a demo in android for imageLoading, I have used first UniversalImageLoader then picasso and then an ImageLoader class,But all times when i upload a new image to server and it successful uploaded to server and when i am trying to set it to ImageView ,the previously loaded...

android imageloader and imageview scaletype

android,imageview,universal-image-loader
I have an imageview element into relativelayout with textView like this <RelativeLayout> <ImageView android:id="@+id/image" android:layout_width="fill_parent" android:layout_height="fill_parent" android:adjustViewBounds="true" android:background="@color/darkblue" android:scaleType="fitXY"/> <TextView android:id="@+id/title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignBottom="@+id/image" android:paddingBottom="2dp" android:gravity="bottom"...

Universal Image Loader NullPointer

android,android-asynctask,universal-image-loader
I am using Universal Image Loader Libray but I am getting NullPointerError at this line return imageUrls.length;Here is my code, I am trying to get images with an AsyncTask. Can somebody help me? public class ImageGridFragment extends AbsListViewBaseFragment { ProgressDialog mProgressDialog; String results; String jsonStr; JSONObject jsonobjectdos; JSONArray jsonarraydos; ListView...

How to stop download of a single image

android,android-activity,universal-image-loader
I'm creating an application where the user selects one item from a recycler view and this starts the download of a group of images. I'm using universal image loader's loadImage method to fetch images for me which is working very well. The problem is,if the user wants to cancel downloading...

Android: UIL I want to be able to load the same image multiple times

java,android,universal-image-loader
So whenever I am using the same image multiple times, it gets cancelled. So I hope you guys can help me I want to use the image as a marker icon Here's my code: String uri = "http://192.168.2.8:3000" + articlesArray.getJSONObject(i).getString("icon"); ImageLoader imageLoader = ImageLoader.getInstance(); imageLoader.loadImage(uri, new ImageLoadingListener() { @Override public...

java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification - List with Universal Image Loader

android,listview,android-asynctask,android-adapter,universal-image-loader
I am trying to update a fragment with list view once the Async call is complete but I am getting the following error : java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. I am updating the adapter onPostExecute and have also checked the...

Throwing Runntime Error Using Universal Image Loader Library

android,universal-image-loader,viewpagerindicator
Hello Friend I am Using Universal Image Loader To Slide Image From Json But I don't know Why its Giving Illegal Argument here Is my Code Debugger jump to error if (result != null) { if (products != null && products.size() != 0) { mViewPager.setAdapter(new ImageSlideAdapter( activity, products, HomeFragment.this)); mIndicator.setViewPager(mViewPager);...

Android Universal Image Loader slow, ignores ImageView height and width

android,image,gridview,universal-image-loader
I am using the Universal Image Loader library for a multiple image picker to display photos from phone's default gallery in a GridView, it displays all my images but really slow. I have tried to follow their docs, and set everything to optimise for a quicker image display. At one...

Force forward slash to // instead of automatically combine to / in string

android,uri,filenotfoundexception,universal-image-loader
Currently, I used Image Loader Universal library to load files from File path in sdcard. I get issue with forward slash in Uri from File Path. The correct string to load file is this one : content://media/external/images/media/24415 But when I put as these codes : imageLoader.displayImage( Uri.fromFile(new java.io.File(FILE_PATH)).toString(), // .replace("%3A",...

Universal Image Loader not loading image for specific link

android,universal-image-loader
I started to use Universal Image Loader instead of Picasso, to avoid the image-not-loading problem. Now it emerges in Universal Image Loader too. It is the same problem with the same unique image, but not other images. The problematic Image: http://luxproperty.kaytami.com/platform/media/image/jpeg/2015/01/4_4.jpg Other properly-behaved images: http://luxproperty.kaytami.com/platform/media/image/jpeg/2015/01/4.2_4.jpg http://luxproperty.kaytami.com/platform/media/image/jpeg/2015/01/4.3_4.jpg...

Android ImageLoader resize

android,universal-image-loader
I'm using ImageLoader (for the first time) to show image on my app. I show images with this : ImageLoader.getInstance().displayImage("http://www.web.com/pic_1.jpg", picture); But picture is a imageview with width 200dp and height 100dp. How can i make the picture to fit in that resolution? whatever the picture is portrait or landscape....

Out-of-memory errors using ImageGetter to grab images from HTML

java,android,memory,bitmap,universal-image-loader
I am writing an application to display posts from a website and using Html.fromHtml to do this. However if I open an article it immediately uses about 25MB of memory to load the images. This would be acceptable only reloading the same article causes another 25MB jump even though the...