Share Pastebin
Guest
Public paste!

mpardo

By: a guest | Feb 9th, 2010 | Syntax: Java | Size: 0.37 KB | Hits: 11 | Expires: Never
Copy text to clipboard
  1. List<Map<String, Object>> categories = new Query<Category>(this, Category.class)
  2.         .orderBy(Category.columns.name, Query.OrderDirection.ascending)
  3.         .loadMap();
  4.  
  5. ListAdapter adapter = new SimpleAdapter(
  6.                 this,
  7.                 categories,
  8.                 android.R.layout.simple_list_item_1,
  9.                 new String[] { Category.columns.name },
  10.                 new int[] { android.R.id.text1 });
  11.  
  12. setListAdapter(adapter);