I have a small DB that collects data(duration,path,name...etc) from song on device and puts them in string. My goal is to use that string to populate ListView. When I use Simple Adapter it works: like this
SimpleAdapter songAdapter =new SimpleAdapter(this,sList,R.layout.songlist_item,new String[]{sqlExcu.SONGNAME,sqlExcu.SONGTIME},new int[]{R.id.title,R.id.time});
but when I try to extend ArrayAdapter it doesn't work.
String[] songName = { sqlExcu.SONGNAME };
String[] songTime = { sqlExcu.SONGTIME };
String[] path = { sqlExcu.SONGPATH };
item = new SongItem(this, songName, songTime);
listSongs.setAdapter(item);
Is there some obvious answer to this, am I doing something wrong?
0 comments:
Post a Comment