title: Unable to start activity in my MainActivity
body: <p>I shall try my best to post the relevant code and explain clearly... I'm following a tutorial on Android; it was a ListView Application which I am now converting to fragments. It told me to change one of my classes from <code>extends ListActivity</code> to <code>extends Activity</code>. In doing so, two of my calls particular to ListActivity needed changing. I thought I changed them properly, but I am getting these errors (just the top of the list): </p>
  
  <pre><code>W/dalvikvm(4486): threadid=1: thread exiting with uncaught exception (group=0x40209760)
  E/AndroidRuntime(4486): FATAL EXCEPTION: main
  E/AndroidRuntime(4486): java.lang.RuntimeException: Unable to start activity 
      ComponentInfo{com.example.testing/com.example.testing.MainActivity}:
      java.lang.ClassCastException: android.widget.FrameLayout cannot be cast to android.widget.ListView
  </code></pre>
  
  <p>My main activity code, the part I believe relevant, is:</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.list_fragment);
  
      ListView lv = (ListView) findViewById(R.id.list_fragment);
      lv.setAdapter(ArrayAdapter.createFromResource(getApplicationContext(),
              R.array.tut_titles, R.layout.activity_main));
      final String[] links = getResources().getStringArray(R.array.tut_links);
  
      lv.setOnItemClickListener(new OnItemClickListener() {
  
          @Override
          public void onItemClick......
  
          }
      });
  }
  </code></pre>
  
  <p>The lv variable is new, and the two calls made with it used to be ListActivity specific. My list_fragment is merely this so far:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;fragment xmlns:android="http://schemas.android.com/apk/res/android"
      android:name="com.example.testing.UrlFragment"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:id="@+id/list_fragment"&gt;
  &lt;/fragment&gt;
  </code></pre>
  
  <p>Phew! I think that's all that's needed, but if I knew for certain, I could probably fix this myself. Can anyone help?</p>