Hi,
I am trying to pull data from a cursor which is initialized as
follows:

Uri inboxUri = Uri.parse("content://sms/");
Cursor c = managedQuery(inboxUri, null, null, null, null);

this effectively gets me to latest text message that has been sent/
received. I am now trying to put certain fields into a listView, but
need to format them before displaying them. The date is represented in
the table in milliseconds and I want to convert it to a date before
placing it in the list.

Here is where I am trying to place the date in my list. How can I
format these fields before placing them into my listview?

private static int[] TO = { R.id.from, R.id.body, R.id.date, };
private static String[] FROMTWO = { FROM, BODY, DATE, };

SimpleCursorAdapter adapter;
adapter = new SimpleCursorAdapter(this,R.layout.item, c, FROMTWO, TO);
setListAdapter(adapter);

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to