0

I have developed an Android app, that has ListView. It is scrolling fine in simulator and HTC device, but scrolling is not working in Samsung Galaxy S and Samsung Vibrant phones, I am getting the reason of this problem, my code is below..

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    android:background="@drawable/x01_background">
    <LinearLayout android:layout_width="fill_parent"
        android:layout_height="fill_parent" android:orientation="vertical">
        <ImageView android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:src="@drawable/topgroupwarmup"
               ></ImageView>
        <ListView android:padding="10dip" android:layout_width="fill_parent" 
            android:layout_height="fill_parent" android:id="@+id/list1" >
        </ListView>
        <ImageView android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:src="@drawable/top_solowarmups"
         ></ImageView>
        <ListView android:padding="10dip" android:layout_width="fill_parent" 
            android:layout_height="fill_parent" android:id="@+id/list2">
        </ListView>
    </LinearLayout>
</ScrollView>

please help me, thanks in advance

Vinay
  • 6,204
  • 6
  • 38
  • 55
Archana
  • 509
  • 2
  • 6
  • 20

2 Answers2

0

try after removing ScrollView tag.......you have used 2 listview then use wrap_content in android:layout_height="fill_parent" in listview node.

Vineet Shukla
  • 23,865
  • 10
  • 55
  • 63
0

Both ListViews should wrap_content. if that does not work just use a LinearLayout to hold your list items.

Ron
  • 24,175
  • 8
  • 56
  • 97