title: Error inflating class fragment (As ListFragment)
body: <p>I get the following error while trying to create a ListFragment in a tab.
  I just want to have a list in that fragment, nothing special.. I'am sorry that this is more a lack of knowledge than a bug, but i hung on this problem for 2 days now and don't know what i shall do else then ask you guys. Thx.</p>
  
  <pre><code>07-07 13:08:18.693: E/AndroidRuntime(19662): FATAL EXCEPTION: main
  07-07 13:08:18.693: E/AndroidRuntime(19662): java.lang.RuntimeException: Unable to start activity ComponentInfo{com..bucp/com..bucp.MainActivity}: android.view.InflateException: Binary XML file line #63: Error inflating class fragment
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.ActivityThread.access$600(ActivityThread.java:127)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.os.Handler.dispatchMessage(Handler.java:99)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.os.Looper.loop(Looper.java:137)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.ActivityThread.main(ActivityThread.java:4441)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at java.lang.reflect.Method.invokeNative(Native Method)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at java.lang.reflect.Method.invoke(Method.java:511)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at dalvik.system.NativeStart.main(Native Method)
  07-07 13:08:18.693: E/AndroidRuntime(19662): Caused by: android.view.InflateException: Binary XML file line #63: Error inflating class fragment
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:255)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.Activity.setContentView(Activity.java:1835)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at com..bucp.MainActivity.onCreate(MainActivity.java:21)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.Activity.performCreate(Activity.java:4465)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    ... 11 more
  07-07 13:08:18.693: E/AndroidRuntime(19662): Caused by: java.lang.ClassCastException: com..bucp.BanlistFragment cannot be cast to android.app.Fragment
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.Fragment.instantiate(Fragment.java:574)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.Fragment.instantiate(Fragment.java:549)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.app.Activity.onCreateView(Activity.java:4235)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:673)
  07-07 13:08:18.693: E/AndroidRuntime(19662):    ... 25 more
  </code></pre>
  
  <p>The given line #63 is the tag of the Fragment:</p>
  
  <pre><code>&lt;fragment        
  android:name="com..bucp.BanlistFragment"
  android:id="@+id/banl_fragment"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  tools:layout="@layout/banlist_fragment" /&gt;
  </code></pre>
  
  <p>The fragment file itselve contains:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
           android:orientation="vertical"
           android:layout_width="match_parent"
           android:layout_height="match_parent"
           android:paddingLeft="8dp"
           android:paddingRight="8dp"&gt;
  
       &lt;ListView android:id="@id/android:list"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:background="#00FF00"
                 android:layout_weight="1"
                 android:drawSelectorOnTop="false"/&gt;
  
       &lt;TextView android:id="@id/android:empty"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:background="#FF0000"
                 android:text="No data"/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>And the fragment class just contains</p>
  
  <pre><code>@Override
   public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    ListAdapter myListAdapter = new ArrayAdapter&lt;String&gt;(
      getActivity(),
      android.R.layout.simple_list_item_1,
      month);
    setListAdapter(myListAdapter);
   }
  
   @Override
   public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
       View tmp_view = inflater.inflate(R.layout.banlist_fragment, container, false);
       ListView list = (ListView) tmp_view.findViewById(android.R.id.list);
    return list;
   }
  </code></pre>