1
我將適配器(擴展baseadapter)設置爲在asynctask後執行列表視圖,但視圖不顯示任何項目。 我得到的所有values.Its一個問題只在android lollypop之前,它的工作正常。我無法找到問題。請幫助查看無法刷新android棒棒糖
in postexecute
System.out.println(agendas.size());//getting value as 1
viewadapter = new Viewadapter(Agenda.this);
lv.setAdapter(viewadapter);
lv.setVisibility(View.VISIBLE);
System.out.println(lv.getVisibility());//getting 0
System.out.println(lv.getAdapter().getCount());//getting count as 1
在viewadapter
@Override
public int getCount() {
return agendas.size();
}
@Override
public Object getItem(int position) {
return agendas.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(final int position, View convertView,
ViewGroup parent) {
//inflating the layout
//assgning values
}
在此先感謝。