title: invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference
body: <p>Hi I'm having difficulty solving this error </p>
  
  <p><a href="http://i.stack.imgur.com/1dHK5.png" rel="nofollow">this is the error</a> <a href="http://i.stack.imgur.com/zFOoU.png" rel="nofollow">enter image description here</a></p>
  
  <p>I am having an issue filling up the listview in my fragment. My fragment is a tab and I am assuming this may be where my issue is.</p>
  
  <p>I hope you can help me 
  Thank you guys</p>
  
  <pre><code>import android.os.Bundle;
  import android.support.annotation.Nullable;
  import android.support.v4.app.Fragment;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.ArrayAdapter;
  import android.widget.ListView;
  import android.widget.TextView;
  
  import java.util.ArrayList;
  import java.util.List;
  
  
  /**
    * Created by Mark Angelo on 1/13/2016.
   */  
  public class ListFragment extends Fragment {
  
  
  TextView code,name,quantity,total;
  ListView lv;
  List&lt;List_Items&gt; myList = new ArrayList&lt;List_Items&gt;();
  
  
  public ListFragment(){
  
  }
  
  @Override
  public void onCreate(Bundle savedInstanceState){
      super.onCreate(savedInstanceState);
  
  
  }
  
  
  
  @Nullable
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,       Bundle savedInstanceState) {
      View view =  inflater.inflate(R.layout.list_fragment_layout,container,false);
  
      populateList();
      populateListView();
  
  
      //lv = (ListView)getActivity().findViewById(R.id.client_listView);
  
      return view;
  }
  
  
  private void populateList() {
  
      myList.add(new List_Items("19912","Mark Angelo Bajaro", "1", "1993"));
      myList.add(new List_Items("12812","Jonas Zaldua","3","18841"));
      myList.add(new List_Items("2323", "Thor Sevilla", "1", "12121"));
  
  }
  
  private void populateListView() {
  
      ArrayAdapter&lt;List_Items&gt; adapter = new MyListAdapter();
      ListView list =  (ListView)getActivity().findViewById(R.id.client_listView);
      list.setAdapter(adapter);
  }
  
  
  
  private class MyListAdapter extends ArrayAdapter&lt;List_Items&gt; {
      public MyListAdapter() {super(getActivity(), R.layout.list_content_layout, myList); }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          View itemview = convertView;
          if(itemview == null){
              itemview = getActivity().getLayoutInflater().inflate(R.layout.list_content_layout,parent,false);
          }
  
          List_Items currentlist = myList.get(position);
  
          code = (TextView)itemview.findViewById(R.id.code_contentent);
          name = (TextView)itemview.findViewById(R.id.name_content);
          quantity = (TextView)itemview.findViewById(R.id.quantity_content);
          total = (TextView)itemview.findViewById(R.id.total_content);
  
          code.setText(currentlist.getCode());
          name.setText(currentlist.getClient_name());
          quantity.setText(currentlist.getQuantity());
          total.setText(currentlist.getTotal());
  
  
          return itemview;
      }
  
  
  }
  </code></pre>
  
  <p>}</p>