I've built my own listview with the specific design shown below. In order to get the rows to overlap as they do, I set the android:dividerHeight
of the listview to -40dip
.
Everything works great and just as expected with one little exception: whenever I scroll up (or down), the listview loads the new views too late since it somehow only starts loading the new view when the view which is currently at the bottom is fully visible on screen.
So now I have to either find a new way to implement the overlap effect or figure out a way to tell the listview to hold onto its views for just a little longer before it marks them as a scrapview (Edit: this behavior actually works fine, the views aren't being unloaded prematurely) or make the listview load the next view before the lowest (or topmost) one is fully on screen yet.
Any help would be really appreciated.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white" >
<View
android:layout_width="10dip"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:background="@color/icygrey" />
<ListView
android:id="@+id/lvActivityTestListView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:dividerHeight="-40dip" >
</ListView>
</RelativeLayout>
Here the 2nd last View is not fully on the screen yet
Here it is -> so the next view suddenly appears