I'm saving some values on a database which have this structure:
Name1-Group1
Name2-Group2
...
Now, I need to load this values to show them on a listview, but just I need to show the Name. Deleting the Group value from the database is not a solution, as I need this value for a sorting usability.
So, this is the way I load the names from the database:
cursor = getContentResolver().query(TravelOrderProvider.CONTENT_URI, PROJECTION, selection, arguments, order);
And then this is how I bind the listview:
ListAdapter mAdapter = new SimpleCursorAdapter(this, android.R.layout.simple_list_item_1, cursor,
new String[] {TravelOrder.NAME}, new int[] {android.R.id.text1});
listView.setAdapter(mAdapter);
But before binding them, as I said before I would need to get the names, split them to just have the name, without the group, and bind them on the listview.
So, what I don't know how to do is how to get the values from the adapter to work with them (split them) and then get them again in the adapter.