8

Calling MyAdapter in an easy way?

view full story
linux-howto

http://stackoverflow.com – I want to make a timetable app for the buses of my city. But, my code is too long. I have a MyAdapter class but as each bus line needs a different adapter my code started to seem like this: MyAdapter list1 = new MyAdapter<String>(this, android.R.layout.simple_list_item_1, R.id.timelist, List1); MyAdapter list2 = new MyAdapter<String>(this, android.R.layout.simple_list_item_1, R.id.timelist, List2); MyAdapter list3 = new MyAdapter<String>(this, android.R.layout.simple_list_item_1, R.id.timelist, List3); // ... And for each of this I have: setAdapter (HowTos)