I'm having difficulty debugging a force quit issue. In the code below you can see that I navigate to a new activity using Intent. However, when I push the back button on the android device, I get a force quit error. Is there something that I'm overlooking to avoid the force quit issue?
public class editList extends Activity implements OnItemClickListener{
ArrayList<String> stock_list;
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.edit);
Intent intent = getIntent();
stock_list = new ArrayList<String>();
stock_list = intent.getStringArrayListExtra("stock_list");
String [] stockArr = new String[stock_list.size()];
stockArr = stock_list.toArray(stockArr);
ListView lv = (ListView)findViewById(R.id.editView);
lv.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, stockArr));
lv.setOnItemClickListener(this);
}
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
// TODO Auto-generated method stub
Intent intent = new Intent(this, input.class);
intent.putExtra("ticker", stock_list.get(arg2));
//finish();
startActivity(intent);
}
}