title: Query multiple colums from a table and display it in viewlist
body: <p>I want to display sms sender address and body in list view after querying from my database
  i saved my sms data in this way</p>
  
  <pre><code>enter ContentValues values = new ContentValues();
  values.put("address", sms.getOriginatingAddress().toString() );
  values.put("date", mydate);
  values.put("address", sms.getOriginatingAddress().toString() );
  values.put("date", mydate);
  values.put("body", sms.getMessageBody().toString());
  
  db.insert("datatable", null, values);
  </code></pre>
  
  <p>now i want to retrive data in such a way to display in listview as "senderaddress" and "body"</p>
  
  <p>i am trying with following code</p>
  
  <pre><code> String[] arrayColumns = new String[]{"address","body"};
          int[] arrayViewIDs = new int[]{R.id.textViewSMSSender,R.id.textViewMessageBody};
  </code></pre>
  
  <p>problem comes here in retriving data</p>
  
  <pre><code> Cursor cursor;
  cursor = getContentResolver().query(Uri.parse("content://sms/inbox"), null, null, null, null);
  </code></pre>
  
  <p>how can i make it to fit in below code</p>
  
  <pre><code>  SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,R.layout.listview_each_item, cursor, arrayColumns, arrayViewIDs);
  
  
  listViewSMS.setAdapter(adapter);
  </code></pre>