• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps starting a new activity throws me into debug mode and stops the app

I have a listview. Whenever I strike an item of listview the debugger gets opened instead of starting a new activity (i.e. what I want).

here is the listview code..

Code:
setListAdapter(new ArrayAdapter<String>(this, R.layout.list_item, s));
        ListView lv = getListView();
        lv.setTextFilterEnabled(true);
        lv.setOnItemClickListener(new OnItemClickListener() {
            public void onItemClick(AdapterView<?> parent, View view,int position, long id) {
                startAc();
    }
  });

the startAc() function is defined on top as:

Code:
public void startAc()
    {
        startActivity( new Intent(this, contents.class) );
    }

the contents class file is defined as:

Code:
package com.webkul.feedGrabber;

import android.app.ListActivity;
import android.os.Bundle;

public class contents extends ListActivity{
     @Override
     protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.m);
     }
}

P.S. all the xml files are correct.
 
Back
Top Bottom