title: How to handle empty listView on fragment
body: <p>How to show empty view, maybe with text saying no data.. if the String array is null</p>
  
  <pre><code>public class SermonsFragment extends ListFragment {
      private String[] sermonsList = null;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          //ListView for the sermon list
          ListAdapter listAdapter = new ArrayAdapter&lt;String&gt;
               (getActivity(), android.R.layout.simple_list_item_1, sermonsList);
          setListAdapter(listAdapter);
  
          //Some people use this but I can't use this syntax somehow
          //SetEmptyView();
  
  
      }
  </code></pre>
  
  <p>This is my xml file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      android:background="#222222" &gt;
  
      &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"&gt;
  
          &lt;!-- Shows an image from your drawable resources --&gt;
          &lt;ImageView
              android:id="@+id/series_banner"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:layout_gravity="center"
              android:src="@drawable/series_banner" /&gt;
          &lt;!-- Closing tag for the horizontal nested layout --&gt;
  
          &lt;View
              android:layout_width="fill_parent"
              android:layout_height="10dp"
              android:layout_marginBottom="10dp"
              android:background="@android:color/darker_gray"/&gt;
  
          &lt;ListView
              android:id="@android:id/list"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:background="#ffffffff" /&gt;
  
          &lt;TextView
              android:id="@android:id/empty"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:text="No Data" /&gt;
  
      &lt;/LinearLayout&gt;
  
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I see some people use setEmptyView, but it does not work for me, I believe due to using ListAdapter.</p>
  
  <p>Which bring me to another mini question, what's the different between ListView and ListAdapter, ArrayAdapter?. When to use which one.</p>