0

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);

}

}

nwalke
  • 3,170
  • 6
  • 35
  • 60
locoboy
  • 38,002
  • 70
  • 184
  • 260
  • Ca you please post the errors too? – Aman Alam Mar 22 '11 at 05:30
  • Here's the error: 03-22 04:09:05.686: WARN/ActivityManager(563): Activity destroy timeout for HistoryRecord{436c8330 {net.cs76.projects.student80815298/net.cs76.projects.student80815298.input}} – locoboy Mar 22 '11 at 08:09
  • Weird. still, can't be sure if its the exact error which is causing force quit. post your logcat output please – Aman Alam Mar 22 '11 at 09:00
  • Use logcat, it shows the description of error (Exception stacktrace). We can't tell u smth, because there's no description of error, so read logcat or use debugger. – UAS Mar 22 '11 at 05:34

0 Answers0