1

I would like to implement a list view that contains a series of thumbnails on each row. I have tried a list view with embedded gallery widgets. It's not working, nothing is being displayed. Just wondering if I'm on the right path, or should I use a different widget for this layout.

Row 1: Image1 Image 2 Image3 Row 2: Image1 Image 2 Image3 etc.

Thanks.

user922295
  • 83
  • 1
  • 7

2 Answers2

1

I was able to solve this problem by creating a scroll view that contained a linear layout. In my code I programmatically added HorizontalScrollView objects, found here: https://github.com/vieux/Android-Horizontal-ListView. Thanks

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/my_layout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:focusable="true"
    android:descendantFocusability="afterDescendants"
    android:layout_marginTop="?android:attr/actionBarSize"
    android:fillViewport="true"> 

    <LinearLayout 
        android:id="@+id/listLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">    
    </LinearLayout>

</ScrollView>
user922295
  • 83
  • 1
  • 7
0

You can try putting horizontal scroll view inside list view.

Chitranshu Asthana
  • 1,089
  • 8
  • 19
  • A horizontal scroll view doesn't take an adapter and I don't know the number of thumbnails that will appear on each row, any other ideas? – user922295 Aug 16 '12 at 14:30
  • I don't think there is any other way, you will have to create custom horizontal scrolling list view. Try looking up on google, I am sure some great mind must have already done it. – Chitranshu Asthana Aug 16 '12 at 15:08