Skip to content

Instantly share code, notes, and snippets.

@dokkaebi
dokkaebi / gist:4173446
Created November 30, 2012 02:39
Android: Set listview item heights to fill available listview height.
public class MyAdapter extends SimpleCursorAdapter {
// constructor, etc...
@Override
public void bindView(View view, Context context, Cursor cursor) {
super.bindView(view, context, cursor);
// Stretch list item height if there are too few to fill the content area.
ListView listView = getListView();