0

Surfing on internet i didn't found nothing about this argument apart this question on this site: here The problem is that my code is good, but the list don't show. This my code:

@Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    id = getArguments().getString("id");
    mylist = new ArrayList<HashMap<String, String>>();
    new MyAsyncTask().execute(); //popolate the mylist
    mSchedule = new SimpleAdapter(getActivity(), mylist, R.layout.rowlinerepair,
            new String[] {"type", "description", "qta", "price"}, new int[] {R.id.Type, R.id.Description, R.id.Qta, R.id.Totale});
    setListAdapter(mSchedule);
  }

I'm using the ListFragment, but is the same in Fragment. I need this beacuse i'm creating a multicolumn list. Thanks

4

1 回答 1

0

I resolved. in postExecute i inserted:

mSchedule = new SimpleAdapter(getActivity(), mylist, R.layout.rowlinerepair,
        new String[] {"type", "description", "qta", "price"}, new int[] {R.id.Type, R.id.Description, R.id.Qta, R.id.Totale});
setListAdapter(mSchedule);
于 2013-08-23T17:24:49.783 回答