Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>you can just do this its a lot easier</p> <pre><code>ListView lv = (ListView)d.findViewById(R.id.dialog_list); Cursor c = getContentResolver().query(BowlersDB.CONTENT_URI,new String[] {BowlersDB.ID,BowlersDB.NAME},null,null,BowlersDB.NAME + " COLLATE LOCALIZED ASC"); if(c.moveToFirst() &amp;&amp; c != null){ SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,R.layout.names_listview,c ,new String[] {BowlersDB.NAME},new int[] {R.id.bListTextView}); lv.setAdapter(adapter); </code></pre> <p>basically just pass the cursor into the simple cursor adapter and it will populate the list from your layouts, no need to make a listadapter when you already have the information</p> <p>EDIT: custom adapter example</p> <pre><code>public class ImageAdapter extends SimpleCursorAdapter { Context context; public ImageAdapter(Context context,int textViewResourceId,Cursor c,String[] from,int[] to){ super(context,textViewResourceId,c,from,to); this.context = context; } @Override public void setViewText(TextView tv,String text){ Cursor c = context.getContentResolver().query(BowlersDB.CONTENT_URI,new String[] {BowlersDB.ID,BowlersDB.NAME} ,BowlersDB.ID+"="+text,null,null); if(c.moveToFirst() &amp;&amp; c != null){ tv.setText(c.getString(1)); } c.close(); } @Override public void setViewImage(ImageView iv,String text){ if(text.equals("1")){ iv.setImageResource(R.drawable.rate_star_small_on_holo_light); } } } </code></pre> <p>these 2 parts of code are from two different sections of my program so please dont think they go together</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload