0

I can set Image on ListVew through XML parse but I can't set image on Gallery. Please let me know how to do that and any links to tutorials or sample could would help.

Marvin Pinto
  • 30,138
  • 7
  • 37
  • 54
user818992
  • 97
  • 1
  • 7

2 Answers2

2

This question has not a specific answer. You have to use many things. You just search on Gallery view and Lazy adapter...

Zacharias Manuel
  • 8,983
  • 1
  • 17
  • 30
1

By using the XML parsing, parse all the image url's. After getting all the image url's you can load the images using Lazy load of images in ListView. On the LazyLoading code they have used a ListView in the layout so the images and the corresponding text are shown as list items, you can change that ListView to a Gallery something like this:

 <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <Gallery android:id="@+id/gallery" android:layout_width="fill_parent"
        android:layout_height="wrap_content" />
        <Button
            android:id="@+id/button1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" 
            android:text="Clear Cache"/>
    </LinearLayout>

I think this will get you the desired result.

Community
  • 1
  • 1
Basil
  • 2,163
  • 2
  • 16
  • 25
  • @user818992 if my answer helped you on solving your issue, then kindly accept my answer. http://stackoverflow.com/faq#reputation – Basil Jan 24 '12 at 04:57