私ListViewはいくつかのデータを入力したいので、 を使用しますSimpleAdapter。しかし、私は次のコードSimpleAdapterでのみ機能するList<HashMap<String, String>>と 思いList<Object>ます。
私に何ができる?何か方法はありますか?
List<DSarchive> programs = ...;
String[] from = new String[] {"name", "time", "day", "month"};
int[] to = new int[] { R.id.text1, R.id.text2, R.id.text3, R.id.text4};
SimpleAdapter adapter = new SimpleAdapter(getActivity(), programs, R.layout.my_list_row, from, to);
// ^ how can I use this "programs" List???
lv.setAdapter(adapter);
Listでアダプタを使いたいMyObject。
MyObjectクラス:
public class MyObject{
public ArrayList<String> links;
public String name;
public List<HashMap<String, String>> adapter;
.
.
.
}