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

  • Home
  • SEARCH
  • 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 5846305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:33:29+00:00 2026-05-22T12:33:29+00:00

I have this method inside an Activity which implements an ImageLoader class: public void

  • 0

I have this method inside an Activity which implements an ImageLoader class:

public void imageLazy(final ImageView image,Project pro)
    {
         String imageurl = pro.smallImageUrl;
        imageLoadery.displayImage(imageurl, activity,image);
    }

but every time I run the Activity, the app crashed. There’s a return null pointer on this line

imageLoadery.displayImage(imageurl, activity,image);

and it refers to the first line on this method on ImageLoader class:

if(((String)photoToLoad.imageView.getTag()).equals(photoToLoad.url)){
                        BitmapDisplayer bd=new BitmapDisplayer(bmp, photoToLoad.imageView);
                        Activity a=(Activity)photoToLoad.imageView.getContext();
                        a.runOnUiThread(bd);
                    }

All I know, what maybe null ist: tag, url, or image.

FYI, the method above is also applied in my listview adapter below. Maybe this can be a reference to help you to solve my case:

public View getView(int position, View convertView, ViewGroup parent) {

        ViewHolder holder = null;

        // Inflate the view
        if (convertView == null) {

            convertView = mInflater.inflate(resource, null);
            holder = new ViewHolder();
            holder.image = (ImageView) convertView.findViewById(R.id.image);
            holder.textTitle = (TextView) convertView
                    .findViewById(R.id.txt_title);
            convertView.setTag(holder);

        } else {
            holder = (ViewHolder) convertView.getTag();
        }

        Project project = items.get(position);

        holder.textTitle.setText(project.project_title);

        String imageurl = project.smallImageUrl;
        holder.image.setTag(imageurl);
        imageLoader.displayImage(imageurl, activity, holder.image);
        return convertView;

    }

What makes it difficult for me, the method in ListView Adapter apply layout inflater for the Tag, which I barely need on my activity above.

Updated

Stacktrace:

05-16 09:02:00.758: INFO/System.out(441): http://cdn.spendino.de/web/img/projects/home/1263830540.jpg
05-16 09:02:00.769: INFO/System.out(441): spendino.de.Main@43d17ab0
05-16 09:02:00.778: INFO/System.out(441): android.widget.ImageView@43d041f0
05-16 09:02:00.778: INFO/System.out(441): http://cdn.spendino.de/web/img/projects/home/1263997113.jpg
05-16 09:02:00.801: INFO/System.out(441): spendino.de.Main@43d17ab0
05-16 09:02:00.829: INFO/System.out(441): android.widget.ImageView@43d17bd0
05-16 09:02:00.829: INFO/System.out(441): http://cdn.spendino.de/web/img/projects/home/1290615697.jpg
05-16 09:02:00.829: INFO/System.out(441): spendino.de.Main@43d17ab0
05-16 09:02:00.829: INFO/System.out(441): android.widget.ImageView@43d18098
05-16 09:02:01.398: INFO/ActivityManager(33): Displayed activity spendino.de/.Main: 3891 ms (total 3891 ms)
05-16 09:02:01.948: WARN/dalvikvm(441): threadid=15: thread exiting with uncaught exception (group=0x4001b188)
05-16 09:02:01.958: ERROR/AndroidRuntime(441): Uncaught handler: thread Thread-9 exiting due to uncaught exception
05-16 09:02:01.978: ERROR/AndroidRuntime(441): java.lang.NullPointerException
05-16 09:02:01.978: ERROR/AndroidRuntime(441):     at spendino.de.ImageLoaderCache$PhotosLoader.run(ImageLoaderCache.java:244)
  • 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-05-22T12:33:30+00:00Added an answer on May 22, 2026 at 12:33 pm

    You missed the setTag method..Hope it will work . Changed the imageLazy method.

     public void imageLazy(final ImageView image,Project pro)
            {
                 String imageurl = pro.smallImageUrl;
                image.setTag(imageurl);
                imageLoadery.displayImage(imageurl, activity,image);
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this method in my db class public function query($queryString) { if (!$this->_connected)
I have this method: public bool CanExecute() And after 70 commits, I added an
I have this method Verify_X which is called during databind for a listbox selected
I have this method: private delegate void watcherReader(StreamReader sr); private void watchProc(StreamReader sr) {
I have this factory method in java: public static Properties getConfigFactory() throws ClassNotFoundException, IOException
I have this two objects class RNB { public RNB(double roomRate, double roomDays) {
I have this method on a webpart: private IFilterData _filterData = null; [ConnectionConsumer(Filter Data
Currently i have this method: static boolean checkDecimalPlaces(double d, int decimalPlaces){ if (d==0) return
I have this function from a plugin (from a previous post) // This method
So i have this method: internal K GetValue<T, K>(T source, string col) where T

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.