protected void onPostExecute(List<String> result){
// here i will make adapter
List<String> list = result;
adapter2 = new ArrayAdapter<List<String>> (getActivity().getBaseContext(),
android.R.layout.simple_list_item_1, list);
listV2.setAdapter(adapter2);
}
错误显示“构造函数ArrayAdapter&gt;(Context,int,List)未定义”为什么?,我该怎么办?
答案 0 :(得分:1)
adapter2
应该是ArrayAdapter<String>
,而不是ArrayAdapter<List<String>>
:
adapter2 = new ArrayAdapter<String>(getActivity().getBaseContext(),
android.R.layout.simple_list_item_1, list);