I thought it should be simple, but I can't figure out how to do it. I've got 2 text fields: phone type and number. I can easily get phone type as integer from Phones.TYPE, but I'd like to display something more meaningful than 1 or 0
Right now I've got code almost straight from one of the tutorials:
Using java Syntax Highlighting
- Cursor c = getContentResolver().query(Phones.CONTENT_URI,
- null,
- Phones.PERSON_ID + "=" + personId,
- null,
- null);
- String[] columns = new String[] { Phones.TYPE, Phones.NUMBER_KEY };
- int[] phones = new int[] {R.id.phone_type, R.id.phone_number};
- mAdapter = new SimpleCursorAdapter(this, R.layout.phones_list, c, columns, phones);
- setListAdapter(mAdapter);
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
How to modify it to return a string (i.e. from a hash map, where keys would be constants from Phones.TYPE) instead of integers? I need something like SimpleCursorAdapter, but with ability to specify some kind of mapping using i.e. a hash map.
Thanks in advance!

