use of com.mobeta.android.dslv.DragSortListView in project drag-sort-listview by bauerca.
the class ArbItemSizeDSLV method onCreate.
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.hetero_main);
DragSortListView lv = (DragSortListView) getListView();
lv.setDropListener(onDrop);
lv.setRemoveListener(onRemove);
mArtistNames = getResources().getStringArray(R.array.jazz_artist_names);
mArtistAlbums = getResources().getStringArray(R.array.jazz_artist_albums);
mArtists = new ArrayList<JazzArtist>();
JazzArtist ja;
for (int i = 0; i < mArtistNames.length; ++i) {
ja = new JazzArtist();
ja.name = mArtistNames[i];
if (i < mArtistAlbums.length) {
ja.albums = mArtistAlbums[i];
} else {
ja.albums = "No albums listed";
}
mArtists.add(ja);
}
adapter = new JazzAdapter(mArtists);
setListAdapter(adapter);
}
Aggregations