Enhanced Listview like Twitter and GasBuddy

Roger Garstang

Well-Known Member
Licensed User
Longtime User
Anyone know how to build the enhanced list view like some apps use where you pull down past the top line and an animated arrow appears at the top that usually spins when you let go and the listview snaps back to normal. Usually this causes the list to reload, etc. Is this really a scrollview with some custom code or is it an actual control?
 

thedesolatesoul

Expert
Licensed User
Longtime User
Yes, it involves two panels.
In the top panel you have a label and an indeterminate progressbar.
In the bottom panel you have your listview.
On the Top panels touch event, you can code it to expand, and add a timer to pull the panel back up.
There is a library out there that I wanted to wrap, but I cant because it uses a default listview with listadapters and I dont know how to do that.
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
There is a library out there that I wanted to wrap, but I cant because it uses a default listview with listadapters and I dont know how to do that.

I remember a few weeks back discussing a custom ListView with you briefly and lack of knowledge of adapters was the problem then too.

I've been learning and have successfully created an ArrayAdapter which populates a ListView from an Array of a data class i created.

I'm now working on a CursorAdapter which basically takes a Cursor and populates a ListView with the Cursor query results.
Looks like you can update the database and notify the CursorAdaptor that the database has been updated and the ListView will be automatically rebuilt.

Powerful stuff that enables complex ListViews with minimal code - once you get a grasp on the concepts of the various adapters available.

PM me if you want some help and i'll get some example library code put together for you.

Martin.
 
Upvote 0
Top