Search code examples
androidlistviewlistactivityfading

Android ListView Edge Fading works on a 2.2 virtual device but not on Samsung 2.2.1


On my ListActivity I get the fading edges effect when running on an Android 2.2 virtual device. However, when I use a Samsung GIO with Android 2.2.1 to run the exact same application, I get no ListView edge fading. What could be the reason? Below is the XML for my ListView in the ListActivity:

<ListView
    android:id="@+id/@android:list"
    android:fadingEdge="vertical"
    android:fadingEdgeLength="3mm"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@id/showMixHeader"/>

Solution

  • If I enable fading for the listview programmatically I see the fading on my Samsung Galaxy Tab:

    listView.setVerticalFadingEdgeEnabled(true); // Make sure that fading is displayed on samsung devices
    

    Maybe Samsung disabled it by default on there version of Android. (Tested on Firmware version 2.2, Samsung Galaxy Tab 7)