title: Listfragment can not be cast to android.app.activity
body: <p>im trying to use a class extends for Listfragment but i cant open it. </p>
  
  <p>I have 2 activitys, firts is the main and extends ActionBarActivity to get action bar to older APIs:</p>
  
  <pre><code>import android.content.Intent;
  import android.os.Bundle;
  import android.support.v7.app.ActionBarActivity;
  import android.view.View;
  
  
      public class MainActivity extends  ActionBarActivity {
  
      //......
  
      public void makeAndEvent (View v){
  
      Intent intent = new Intent(getBaseContext(), Events.class);
              startActivity(intent);
          }
      }
  </code></pre>
  
  <p>The seconds is the conflic here:</p>
  
  <pre><code>import android.content.Intent;
  import android.os.Bundle;
  import android.support.v4.app.ListFragment;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  
  
  
  public class Events extends ListFragment {
  
  
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          View rootView = inflater.inflate(R.layout.activity_events, container, false);
          return rootView;
      }
  }
  </code></pre>
  
  <p>But when the app try lo launch the second activity, Events, i get this error in log:</p>
  
  <pre><code>08-02 18:59:38.279: E/AndroidRuntime(12284): FATAL EXCEPTION: main
  08-02 18:59:38.279: E/AndroidRuntime(12284): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.app.myapp/com.app.myapp.Events}: java.lang.ClassCastException: com.app.myapp.Events cannot be cast to android.app.Activity
  08-02 18:59:38.279: E/AndroidRuntime(12284):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1998)
  08-02 18:59:38.279: E/AndroidRuntime(12284):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2099)
  08-02 18:59:38.279: E/AndroidRuntime(12284):    at android.app.ActivityThread.access$600(ActivityThread.java:138)
  08-02 18:59:38.279: E/AndroidRuntime(12284):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
  08-02 18:59:38.279: E/AndroidRuntime(12284):    at android.os.Handler.dispatchMessage(Handler.java:99)
  08-02 18:59:38.279: E/AndroidRuntime(12284):    at android.os.Looper.loop(Looper.java:137)
  08-02 18:59:38.279: E/AndroidRuntime(12284):    at android.app.ActivityThread.main(ActivityThread.java:4929)
  08-02 18:59:38.279: E/AndroidRuntime(12284):    at java.lang.reflect.Method.invokeNative(Native Method)
  08-02 18:59:38.279: E/AndroidRuntime(12284):    at java.lang.reflect.Method.invoke(Method.java:511)
  08-02 18:59:38.279: E/AndroidRuntime(12284):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:798)
  08-02 18:59:38.279: E/AndroidRuntime(12284):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:565)
  08-02 18:59:38.279: E/AndroidRuntime(12284):    at dalvik.system.NativeStart.main(Native Method)
  08-02 18:59:38.279: E/AndroidRuntime(12284): Caused by: java.lang.ClassCastException: com.app.myapp.Events cannot be cast to android.app.Activity
  08-02 18:59:38.279: E/AndroidRuntime(12284):    at android.app.Instrumentation.newActivity(Instrumentation.java:1056)
  08-02 18:59:38.279: E/AndroidRuntime(12284):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1989)
  </code></pre>
  
  <p>Some one can help me pls?</p>