I am having a bit of a problem with populating a list from a RingtoneManager to a new ListActivity. The list populates with the correct number of items in the directory but doesn't show the titles or any text. Using the Log.d(); I can see the items are being pulled properly but not displaying. Any guidance would be appreciated.
mRingtoneManager2 = new RingtoneManager(this); //adds ringtonemanager
mRingtoneManager2.setType(RingtoneManager.TYPE_RINGTONE); //sets the type to ringtones
mRingtoneManager2.setIncludeDrm(true); //get list of ringtones to include DRM
mCursor2 = mRingtoneManager2.getCursor(); //appends my cursor to the ringtonemanager
mRingtoneManager2.setType(RingtoneManager.TYPE_RINGTONE); //sets the type to ringtones
mRingtoneManager2.setIncludeDrm(true); //get list of ringtones to include DRM
mCursor2 = mRingtoneManager2.getCursor(); //appends my cursor to the ringtonemanager
startManagingCursor
mCursor2); //starts the cursor query
//prints output for diagnostics
//prints output for diagnostics
String test =
mCursor2.getString(mCursor2.getColumnIndexOrThrow(RingtoneManager.EXTRA_RINGTONE_TITLE));
Log.d(null, test, null);
String[] from = {RingtoneManager.EXTRA_RINGTONE_TITLE}; // get the list items for the listadapter
int[] to = newint[] {R.id.item1}; //sets the items from above string to listview
//new listadapter, created to use android checked template
Log.d(null, test, null);
String[] from = {RingtoneManager.EXTRA_RINGTONE_TITLE}; // get the list items for the listadapter
int[] to = newint[] {R.id.item1}; //sets the items from above string to listview
//new listadapter, created to use android checked template
SimpleCursorAdapter listadapter =
new SimpleCursorAdapter(this, android.R.layout.simple_list_item_checked, mCursor2, from, to );
setListAdapter(listadapter);