Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8857517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:36:31+00:00 2026-06-14T14:36:31+00:00

I have implemented a Custom ListView using LazyAdapter to display thumbnail images. Finally after

  • 0

I have implemented a Custom ListView using LazyAdapter to display thumbnail images. Finally after I got this LazyAdapter working, the OnItemClickListener doesn’t display the data and simply returns the empty strings. The code is working fine if I remove the Custom LazyAdapter class for the ListView.

    class LoadAllDirectories extends AsyncTask<String, String, String> {

        protected String doInBackground(String... args) {

            UserFunctions fn = new UserFunctions();
            String id = fn.getID(getApplicationContext());

            List<NameValuePair> params = new ArrayList<NameValuePair>();
            params.add(new BasicNameValuePair("id", id));

            JSONObject json = 
            jParser.makeHttpRequest(url_all_directories, "GET", params);

            Log.d("All Directories: ", json.toString());

            try {

                int success = json.getInt(TAG_SUCCESS);

                if (success == 1) {

                    directories = json.getJSONArray(TAG_DIRECTORIES);

                    for (int i = 0; i < directories.length(); i++) {
                        JSONObject c = directories.getJSONObject(i);

                        String eid = c.getString(TAG_ID);
                        String name = c.getString(TAG_NAME);                        
                        String image = c.getString(TAG_IMG);

                        HashMap<String, String> map = 
                        new HashMap<String, String>();

                        map.put(TAG_ID, eid);
                        map.put(TAG_NAME, name);                        
                        map.put(TAG_IMG, image);

                        directoryList.add(map);
                    }

                } else {

                    Intent i = new Intent(getApplicationContext(),
                            DirectoryActivity.class);

                    i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                    startActivity(i);
                }
            } catch (JSONException e) {
                e.printStackTrace();
            }

            return null;
        }

        protected void onPostExecute(String file_url) {

            runOnUiThread(new Runnable() {
                public void run() {

                    ListAdapter adapter = new LazyAdapter(
                    DirectoryAllActivity.this, directoryList);                  
                    setListAdapter(adapter);
                }
            });

        }

    }

}

ErrorLog

update: part of the duplicated Log was deleted.

11-19 14:17:12.612: W/System.err(16343): java.net.MalformedURLException: Protocol not found: null
11-19 14:17:12.612: W/System.err(16343):    at java.net.URL.<init>(URL.java:178)
11-19 14:17:12.612: W/System.err(16343):    at java.net.URL.<init>(URL.java:127)
11-19 14:17:12.612: W/System.err(16343):    at com.app.android.library.ImageLoader.getBitmap(ImageLoader.java:70)
11-19 14:17:12.612: W/System.err(16343):    at com.app.android.library.ImageLoader.access$0(ImageLoader.java:58)
11-19 14:17:12.612: W/System.err(16343):    at com.app.android.library.ImageLoader$PhotosLoader.run(ImageLoader.java:135)
11-19 14:17:12.612: W/System.err(16343):    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
11-19 14:17:12.622: W/System.err(16343):    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
11-19 14:17:12.622: W/System.err(16343):    at java.util.concurrent.FutureTask.run(FutureTask.java:137)
11-19 14:17:12.622: W/System.err(16343):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
11-19 14:17:12.622: W/System.err(16343):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
11-19 14:17:12.622: W/System.err(16343):    at java.lang.Thread.run(Thread.java:856)
11-19 14:17:12.653: D/memalloc(16343): ion: Mapped buffer base:0x5e951000 size:3768320 offset:0 fd:55
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:36:33+00:00Added an answer on June 14, 2026 at 2:36 pm
    Caused By: java.net.MalformedURLException
    

    You need to use a real URL, not this:

    private static String url_all_directories = "a_web_url";
    

    You can start with the tutorial’s suggested URL: http://api.androidhive.info/music/music.xml


    Hey! You sneakily changed your LogCat.

    Anyway, now the problem is an image URL:

    at com.app.android.library.ImageLoader.getBitmap(ImageLoader.java:70) 
    

    Check the data at “a_web_url”, which is apparently on a server of yours…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented a custom ListItem for my ListView. The ListItem looks like this:
I'm using OSMdroid to implement a mapping application. I have implemented a custom MapTileProvider
I have implemented a custom membership provider using LINQ to SQL. When I added
I have implemented an application with Custom base adapter for display data in list
I have an activity with a listview in it. I implemented a custom list
I have a listview, with around 200 items, I have implemented a custom ArrayAdapter
I have a custom control that is derived from ListView . This list view
I have a custom listView defined like this public class DDListView extends ListView implements
I have implemented a ListView in my Android application. I bind to this ListView
I have a listview from an SQLDatabase using custom CursorAdaptor. I would like to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.