Hi guys I have a problem with my `ListView`...
This is my code:

```
     private ArrayAdapter<String> adapter ;  

      private ProgressDialog m_ProgressDialog = null; 
        private ArrayList<Order> m_orders = null;
        public OrderAdapter m_adapter;
        private Runnable viewOrders;

        public class Order {

            private String orderName;
            private String orderStatus;

            public String getOrderName() {
                return orderName;
            }
            public void setOrderName(String orderName) {
                this.orderName = orderName;
            }
            public String getOrderStatus() {
                return orderStatus;
            }
            public void setOrderStatus(String orderStatus) {
                this.orderStatus = orderStatus;
            }
        }
        private class OrderAdapter extends ArrayAdapter<Order> {

            private ArrayList<Order> items;

            public OrderAdapter(Context context, int textViewResourceId, ArrayList<Order> items) {
                    super(context, textViewResourceId, items);
                    this.items = items;
            }

            @Override
            public View getView(int position, View convertView, ViewGroup parent) {

                    View v = convertView;
                    if (v == null) {
                        LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                        v = vi.inflate(R.layout.list_single, null);
                    }
                    Order o = items.get(position);
                    if (o != null) {
                          //  TextView tv2 = (TextView) v.findViewById(R.id.tv2);
                        TextView tv1 = (TextView) v.findViewById(R.id.tv1); //codice volo
                        TextView tv2 = (TextView) v.findViewById(R.id.tv2); // citta

                        TextView tv5 = (TextView) v.findViewById(R.id.tv5); //stato volo
                        TextView tv6 = (TextView) v.findViewById(R.id.tv6); //ora prevista
                        TextView tv7 = (TextView) v.findViewById(R.id.tv7); //ora stimata                           if (tt != null) {

                        tv1.setText("VOLO: "+o.getOrderName());                            
                        }
                    return v;
            }    
        }

        private void getOrders(){
              try{
                  m_orders = new ArrayList<Order>();
                  Order o1 = new Order();
                  o1.setOrderName("SF services");
                  o1.setOrderStatus("Pending");
                  Order o2 = new Order();
                  o2.setOrderName("SF Advertisement");
                  o2.setOrderStatus("Completed");
                  m_orders.add(o1);
                  m_orders.add(o2);
                     Thread.sleep(2000);
                  Log.i("ARRAY", ""+ m_orders.size());
                } catch (Exception e) { 
                  Log.e("BACKGROUND_PROC", e.getMessage());
                }
                runOnUiThread(returnRes);
            }
        public LayoutInflater getSystemService(String layoutInflaterService) {
            // TODO Auto-generated method stub
            return null;
        }

        private Runnable returnRes = new Runnable() {

            @Override
            public void run() {
                if(m_orders != null && m_orders.size() > 0){
                    m_adapter.notifyDataSetChanged();
                    for(int i=0;i<m_orders.size();i++)
                    m_adapter.add(m_orders.get(i));
                }
                m_ProgressDialog.dismiss();
                m_adapter.notifyDataSetChanged();
            }
          };

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

       View ios = inflater.inflate(R.layout.arrivi, container, false); 

       m_orders = new ArrayList<Order>();
       this.m_adapter = new OrderAdapter(getActivity(), R.layout.list_single, m_orders);
               setListAdapter(getActivity(),m_adapter);

       viewOrders = new Runnable(){
           @Override
           public void run() {
               getOrders();
           }
       };
   Thread thread =  new Thread(null, viewOrders, "MagentoBackground");
       thread.start();
       m_ProgressDialog = ProgressDialog.show(getActivity(),    
             "Please wait...", "Retrieving data ...", true);

//   new MyTask().execute("");
   return ios;

}      

private void setListAdapter(FragmentActivity activity,
        OrderAdapter m_adapter2) {
    // TODO Auto-generated method stub

}

```

In eclipse I get this error:
The method runOnUiThread(Runnable) is undefined for the type arrivi
This code isn't in MainActivity but in a fragment named arrivi.
The file XML is list\_single.xml and is associated at custom rows!
Can you help me please?

Another question...
How to implement `AsyncTask` for replacing `Thread`?

```
public class MyTask extends AsyncTask<String, Void, String> {
    ProgressDialog prog;
    String info;

```

.... When I run my app... it's in loop in "Retrieving data ..."
Thank you so much!!