title: How do I add a Listview Of BaseAdapter in a Fragment?
body: <p>I want to add a <code>ListView</code> in a <code>Fragment</code> that uses a custom adapter extending <code>BaseAdapter</code>.
  I don't want to try it through <code>ListFragment</code> because I've wriiten a lot of code in that fragment.
  Can you help me to add a <code>ListView</code> in a <code>Fragment</code>.</p>
  
  <pre><code>adapter = new MyTableAdapter(getActivity(), list);
  list.setAdapter(adapter);
  </code></pre>
  
  <p>and Adapter Class</p>
  
  <pre><code>public class MyTableAdapter extends BaseAdapter {
      List&lt;Root.StandingBean&gt; list;
      Activity context;
  
      public MyTableAdapter(Activity context, List&lt;Root.StandingBean&gt; list) {
          this.context = context;
          this.list = list;
      }
  
      public View getView(int position, View convertView, ViewGroup parent) {
          LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          View rowView = inflater.inflate(R.layout.table_adapter, parent, false);
          TextView name = (TextView) rowView.findViewById(R.id.name);
          TextView pos = (TextView) rowView.findViewById(R.id.pos);
          TextView points = (TextView) rowView.findViewById(R.id.points);
          name.setText(list.get(position).getTeamName());
          pos.setText(String.valueOf(position));
          points.setText(String.valueOf(list.get(position).getPoints()));
          return rowView;
      }
  }
  </code></pre>