0

So im following this code, the popular lazy loading example: Lazy load of images in ListView

I set up in my own project something similar with a layout xml along with the following code:

<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent">


      <!--  Screen Design for VIDEOS -->
      <ListView
      android:id="@+id/list"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"/>


</LinearLayout>

It works great, however if I add a ListView programmatically like so:

 this.list = new ListView(this);
        this.list.setClickable(true);

        addContentView(this.list, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));

The listview displays with the default icons, but no images are loaded. So the xml layout works, but programmatically it doesnt.

Any suggestions?

EDIT:

Looks like when I use an xml layout it only shows the images that I have loaded in the LazyLoader example project. I have the project imported in the same workspace. They must be affecting each other.

Essentially, I cannot load any other image other than the ones in the example, which makes me believe it has something to do with the cache?

Community
  • 1
  • 1
Adam
  • 8,849
  • 16
  • 67
  • 131

1 Answers1

0

I figured out that I didn't add external cache permissions to the manifest.

Adam
  • 8,849
  • 16
  • 67
  • 131