0

I have an application that shows nearby merchant list. It shows the name and image. Now I have created an app widget for the same, linked to this application. I wanted to use the same ImageLoader class and methods for app widget as I used for this application. But the image is not getting displayed. It is still set to its default one and does not change on click of a button with name. Please guide.

My URL is null on debugging and I cant figure out why image loader class is not getting loaded.

Here is the snippet for the button listener.

public static String forwardButtonListener(String name){


        ImageView logoView = new ImageView(mContext);
        Images imgs;
        String url;

        Log.i("StoreTag","storeval:"+name);

        String address="Some Address";

        if(i<list.size()){
            //i++;
            if(i==0){
                i++;
            }
            Log.i("Inside forwardButtonListener","List's size"+list.size());
            updateViews.setBoolean(R.id.next, "setEnabled", true);

            storeObject = list.get(i).getStore(); //one store at ith position
            name = storeObject.getName();
            address = String.valueOf(storeObject.getAddress().getStreet1());

            logoView.setImageResource(R.id.merchant_image);
            setStoreLogo(logoView, storeObject);

            imgs = storeObject.getImages();
            Log.i("Image UrL tag","-------"+imgs);
            url = imgs.getLogo();
            imageLoader.DisplayImage(url, logoView);
            if(null!=url)
            Log.i("Image UrL tag","-------"+url);

            updateViews.setImageViewUri(R.id.merchant_image,Uri.parse(url));


            sId = String.valueOf(storeObject.getId());
            sName = name;
            i++;

            updateViews.setTextViewText(R.id.merchant_text, name);
            updateViews.setTextViewText(R.id.merchant_address, address);

            updateViews.setBoolean(R.id.back, "setEnabled", true);
            pushWidgetUpdate(mContext,updateViews);
        }
        else if(i==list.size()){
            updateViews.setBoolean(R.id.back, "setEnabled", true);
            updateViews.setBoolean(R.id.next, "setEnabled", false);

            pushWidgetUpdate(mContext,updateViews);
        }
        return name;

    }
nostra13
  • 12,377
  • 3
  • 33
  • 43
Atihska
  • 4,803
  • 10
  • 56
  • 98
  • @NOSTRA Hey.. Please correct me with it. I am getting the url in logcat but not in display so how to update my view? I am updating but Its not displaying. Please guide.. – Atihska Jul 11 '13 at 22:46
  • Which library do you use? LazyList? – nostra13 Jul 12 '13 at 08:10

0 Answers0