Android ListView Images and Texts Tutorial

  • ibrahim

    U R Awesome

  • Hi ibrahim, please post your tutorial request in our Android Developers Forum. 🙂

  • Mawar Adityaristy

    hi dude, I need best solution for get data following this tutorial, why every move to another fragment, still load to getting data. while I do not do updates. thank for advance.

  • Mawar Adityaristy

    I found a sample code to cache query, but I don’t know how to use it for this tutorial, could you kindly to help us ?

    query.findInBackground(new FindCallback() {
    public void done(List worldpopulationlist , ParseException e) {
    if (e == null) {
    // Results were successfully found, looking first on the
    // network and then on disk.
    } else {
    // The network was inaccessible and we have no cached data
    // for this query.

    thank you

  • Aravind Asthme

    The Listview are not loading.did i miss something? i changed application ID ,and client key.This is my Parse DashBoard

  • Aadithya Umashanker

    hey i hav a doubt.. when i click the item from the list, it is force closing… actually it worked before.. but now even it is not working in ur source code.. can u explain ??

  • anushya subbiah

    same problem. unfortunately stops when listview item is clicked….. i followed the same rules to create the country class…. The data is displayed in the listview perfectly . but when an item is clicked it gets unfortunately stopped instead of opening singleitemview activity

  • vj

    works like charm!!!!!!!!!
    thanxs buddy.

  • AndroidGirl

    Downloaded code works great!!!!

    But when i copied the code into individual files it is giving me error ….

    03-14 14:12:43.254: E/WindowManager(9674): Activity com.example.downloadimagesfromparse.MainActivity has leaked window$DecorView{41bd1b50 V.E….. R……D 0,0-729,324} that was originally added here

    03-14 14:12:43.254: E/WindowManager(9674): android.view.WindowLeaked: Activity com.example.downloadimagesfromparse.MainActivity has leaked window$DecorView{41bd1b50 V.E….. R……D 0,0-729,324} that was originally added here

    03-14 14:12:43.254: E/WindowManager(9674): at android.view.ViewRootImpl.(

    03-14 14:12:43.254: E/WindowManager(9674): at android.view.WindowManagerGlobal.addView(

    03-14 14:12:43.254: E/WindowManager(9674): at android.view.WindowManagerImpl.addView(

    03-14 14:12:43.254: E/WindowManager(9674): at

    03-14 14:12:43.254: E/WindowManager(9674): at com.example.downloadimagesfromparse.MainActivity$RemoteDataTask.onPreExecute(

    03-14 14:12:43.254: E/WindowManager(9674): at android.os.AsyncTask.executeOnExecutor(

    03-14 14:12:43.254: E/WindowManager(9674): at android.os.AsyncTask.execute(

    03-14 14:12:43.254: E/WindowManager(9674): at com.example.downloadimagesfromparse.MainActivity.onCreate(

    03-14 14:12:43.254: E/WindowManager(9674): at

    03-14 14:12:43.254: E/WindowManager(9674): at

    03-14 14:12:43.254: E/WindowManager(9674): at

    03-14 14:12:43.254: E/WindowManager(9674): at

    03-14 14:12:43.254: E/WindowManager(9674): at$600(

    03-14 14:12:43.254: E/WindowManager(9674): at$H.handleMessage(

    03-14 14:12:43.254: E/WindowManager(9674): at android.os.Handler.dispatchMessage(

    03-14 14:12:43.254: E/WindowManager(9674): at android.os.Looper.loop(

    03-14 14:12:43.254: E/WindowManager(9674): at

    03-14 14:12:43.254: E/WindowManager(9674): at java.lang.reflect.Method.invokeNative(Native Method)

    03-14 14:12:43.254: E/WindowManager(9674): at java.lang.reflect.Method.invoke(

    03-14 14:12:43.254: E/WindowManager(9674): at$

    03-14 14:12:43.254: E/WindowManager(9674): at

    03-14 14:12:43.254: E/WindowManager(9674): at dalvik.system.NativeStart.main(Native Method)

    • شبير البلوشي

      did you find the solution??? because i’m getting the same error. i think it’s because of the dialogue box.

  • Larry N

    Looks like a great demo. I finally got it to run, but it crashes while loading. How can I spot the cause?

  • Neegbeah Reeves

    How comes the images show on the emulator but not on actual device. I’m using Android Studio by the way

  • עידו נ

    I’m trying to get an int value and view inside my listview.

    I’ve changed a bit this line:
    map.setViews((int) info.get(“Views”));
    The problem is:
    Cannot cast from Object to int.

    What to do?

  • Hans

    Great tutorial!!!

  • Sinead Keegan

    Excellent tutorial having trouble setting up the image loader to download directly from the parse database instead of the drawable folder any tips?

  • E Black

    Excellent tutorial works like a charm. little issue im tryin to find a work round if no image is save the listview will crash any advice. thank you

    • Boris Soto

      yes, me too,

  • Kumar Vivek

    Hey Buddy

    Unable to load the image.

    Its showing the temp image in place of original image.

  • i would just like to take my parse query and 1 parse object and input them into my List View :'( i’ve spent nearly 36 hours trying to figure it out please help me some one.

  • mohammad

    How I can save all data on the application for using offline ? is need sqlite ? thanks to help me

  • ProjectPlay App

    I’ve followed the tutorial ( and build up my apps successfully. But I’ve got a problem. There are more than 100 items in my parse class, but the app listview only loads and show the first 99 items. How can I load all the 100+ items in the app?

  • karampal

    How use fragments rather then a activity i mean what change needed if i use it in a fragment not in to main activity or other activity….

    • Adhik Joshi

      same problem here…

  • Vidur Sachdeva

    Thanks for the tutorial. I have a question as data is added to the list and then it is passed in onPostExecute() method so I get data after along wait (if number of rows in table/class is more). Suppose I want to show data of the the objects retrieved in for loop one by one in listview so that i dont have to wait till all objects will be added to list and can show . what can i do for that.

  • עידו נ

    I’m having a problem with this tutorial.
    I have only one TextView every row.
    When I’m trying to populate the ListView, it looks like this:

    instead of:

    I mean, it shows the first row TextView text for all of the TextViews, instead of different TextViews.
    What can I do to fix this?

  • Kwame

    Hi best tutorial i have seen so far but here is a simple quick question i
    want the query to load the most recently saved image first
    orderbyDescending) and i have already tried changing **query.orderByAscending(“createdAt”); ** to **query.orderByDescending(“createdAt”);**however i cannot seem to achieve this i have
    researched and tried countless “SOLUTIONS” to no avail am stuck kindly
    help 🙁

    • Luan Felipe Appolinário

      Hi. Create a new column on called number and fill with the order what you need and use the query for this.

  • עידו נ

    Is there any way to do the same thing, but together with an ExpandableListView instead of just a normal ListView?

  • Dušan Dimitrijević


    Thank you for this tutorial, but i’m getting some error in method doInBackground. Here’s the error:

    07-07 15:36:09.379: E/AndroidRuntime(17761): java.lang.RuntimeException: An error occured while executing doInBackground()

    07-07 15:27:44.871: E/AndroidRuntime(12496): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method ‘ com.parse.ParsePlugins.getParseDir()’ on a null object reference

    Can anyone help me?

  • Nikki

    Why does it throw a null pointer exception at singleitemview?

  • Kanat

    I couldn’t download my images from Instead showing images from, app shows default image. Could anybody help me?

  • עידו נ

    When I tried to run the ListView, I get a null object reference on this line:
    It crashes as soon as I open the ListView activity.
    This is the third ListView that I have in my app, that using this guide, and I am getting this error only on this ListView…

    Can someone please help me here, or write me an email with an answer or ways to solve this problem to my email (


  • Shirisha Gangula

    2983-2983/com.shirisha.videos E/WindowManager﹕ android.view.WindowLeaked: Activity com.shirisha.videos.MainActivity has leaked window$DecorView{42164ab0 V.E….. R……D 0,0-707,192} that was originally added here

    at android.view.ViewRootImpl.(

    at android.view.WindowManagerGlobal.addView(

    at android.view.WindowManagerImpl.addView(


    at com.shirisha.videos.MainActivity$RemoteDataTask.onPreExecute(

    at android.os.AsyncTask.executeOnExecutor(

    at android.os.AsyncTask.execute(

    at com.shirisha.videos.MainActivity.onCreate(







    at android.os.Handler.dispatchMessage(

    at android.os.Looper.loop(


    at java.lang.reflect.Method.invokeNative(Native Method)

    at java.lang.reflect.Method.invoke(



    at dalvik.system.NativeStart.main(Native Method)

    Im getting this error
    How can i resovle it

  • Matt Ginsberg

    In my single list view activity, how would I add an option to delete that item from parse and the listview will update automatically

  • Luan Felipe Appolinário

    I have a problem. I like it when the user is offline load the listview to data from the last time the user logged on the internet. I tried in various places , but not found .

  • Yong Jia Chan

    Hi, I have this problem. I get blank page in retrieve the data, nothing has shown. I check the code it looks ok, and I m following exactly like yours. I guess is not getting data from the server at all. However, i try other app which using the same method is able to get data, please help.

    • Luan Felipe Appolinário

      What the problem?

      • Yong Jia Chan

        Im sure i have login to parse as my other function is working, some times it is able todisplay the image, some times it is not

        • Luan Felipe Appolinário

          What is the logcat error when the listview not display the images?

          • Yong Jia Chan

            There is no error, just display the default image

          • Luan Felipe Appolinário

            I don’t understand the problem.

  • Tejas Patel

    If in custom listview, image can not download then add the permission in android Manifest.xml…

    I solved this..Thankz a lot…