title: Custom ListView not showing any items
body: <p>I am trying to display a custom listview but nothing appears.
  My activity:</p>
  
  <pre><code>import java.util.ArrayList;
  
  import org.json.JSONArray;
  import org.json.JSONException;
  
  import com.example.elnoorgeh.ServerAPI;
  
  import android.app.Fragment;
  import android.os.AsyncTask;
  import android.os.Bundle;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.webkit.WebView.FindListener;
  import android.widget.AdapterView;
  import android.widget.EditText;
  import android.widget.ListView;
  import android.widget.RelativeLayout;
  import android.widget.TextView;
  import android.widget.Toast;
  
  public class BlogFragment extends Fragment {
      JSONArray jArray;
      TextView title;
      RelativeLayout layout;
      int previousID = 0;
      int currentID = 0;
      ArrayList&lt;String&gt; titles;
      ArrayList&lt;String&gt; contents;
      ListView list;
  
      public BlogFragment() {
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          View rootView = inflater.inflate(R.layout.fragment_blog, container,
                  false);
          new AsyncFetch().execute();
          return rootView;
      }
  
      private class AsyncFetch extends AsyncTask&lt;Object, Object, Object&gt; {
  
          @Override
          protected Object doInBackground(Object... params) {
              // TODO Auto-generated method stub
              jArray = new JSONArray();
              jArray = ServerAPI.getData();
              titles = new ArrayList&lt;String&gt;();
              contents = new ArrayList&lt;String&gt;();
              for (int i = 0; i &lt; jArray.length(); i++) {
                  String blogTitle = null;
                  String content = null;
                  try {
                      blogTitle = jArray.getJSONObject(i).getString("title");
                      content = jArray.getJSONObject(i).getString("content");
                      titles.add(blogTitle);
                      contents.add(content);
  
                  } catch (JSONException e1) {
                      // TODO Auto-generated catch block
                      e1.printStackTrace();
                  }
  
                  System.out.println(blogTitle);
                  System.out.println(content);
              }
              // display(titles, contents);
              return null;
          }
  
          protected void onPostExecute(Object result) {
  
              layout = (RelativeLayout) getView().findViewById(R.id.blogPage);
              layout.removeAllViews();
  
              CustomList adapter = new CustomList(getActivity(), titles);
              list = new ListView(getActivity());
              System.out.println("list done");
              list.setAdapter(adapter);
              list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
                  @Override
                  public void onItemClick(AdapterView&lt;?&gt; parent, View view,
                          int position, long id) {
                      Toast.makeText(getActivity(),
                              "You Clicked at " + titles.get(position),
                              Toast.LENGTH_SHORT).show();
                  }
              });
          }
      }
  
      public void display(ArrayList&lt;String&gt; t, ArrayList&lt;String&gt; c) {
  
      }
  }
  </code></pre>
  
  <p>Custom ListView class:</p>
  
  <pre><code>import java.util.ArrayList;
  
  import android.app.Activity;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.ArrayAdapter;
  import android.widget.ImageView;
  import android.widget.TextView;
  
  public class CustomList extends ArrayAdapter&lt;String&gt; {
      private final Activity context;
      private final ArrayList&lt;String&gt; web;
  //  private final Integer[] imageId;
  
      public CustomList(Activity context, ArrayList&lt;String&gt;web) {
          super(context, R.layout.fragment_listview);
          this.context = context;
          this.web = web;
  //      this.imageId = imageId;
      }
  
      @Override
      public View getView(int position, View view, ViewGroup parent) {
          LayoutInflater inflater = context.getLayoutInflater();
          View rowView = inflater.inflate(R.layout.fragment_listview, null, true);
          TextView txtTitle = (TextView) rowView.findViewById(R.id.txt);
          ImageView imageView = (ImageView) rowView.findViewById(R.id.img);
          txtTitle.setText((CharSequence) web.get(position));
  //      imageView.setImageResource(imageId[position]);
          return rowView;
      }
  }
  </code></pre>
  
  <p>fragment_blog:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/blogPage"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
  
      &lt;ListView
         android:id="@+id/list"
          android:layout_width="match_parent"
          android:layout_height="match_parent" &gt;
      &lt;/ListView&gt;
  
      &lt;TextView
          android:id="@+id/txtLabel"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerInParent="true"
          android:maxLines="20"
          android:singleLine="false"
          android:textSize="16dp" /&gt;
  
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>fragment_listview:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
      &lt;TableRow&gt;
  
          &lt;ImageView
              android:id="@+id/img"
              android:layout_width="50dp"
              android:layout_height="50dp" /&gt;
  
          &lt;TextView
              android:id="@+id/txt"
              android:layout_width="wrap_content"
              android:layout_height="50dp" /&gt;
      &lt;/TableRow&gt;
  
  &lt;/TableLayout&gt;
  </code></pre>
  
  <p>I can't find any errors or notice something irregular, so why is that happening?</p>