I have a very very strange issue, and i believe my elcipse juno is broken. I have the Android ADT plugin in this eclipse.
The following screenshot will prove my believe.
And its not finished yet. After the screenshot above, i press F6 again, and this is what i got :
I will explain this case once again to make a clear question. I debug my application, then i got that the arg2
value is 1. After that, i press f6 and the code goes to case 0 (instead of case 1) and then i press f6 again and the code goes to case 6 (WTF????? i do have a break
, how come it comes to case 0 and case 6?)
In case you need it, this is the code in the above screenshots :
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { // TODO Auto-generated method stub Intent i = new Intent(this, Chapter.class); switch(arg2) { case 0: Toast.makeText(this, "a", Toast.LENGTH_SHORT).show(); break; case 1: i.putExtra("key", 1); Toast.makeText(this, arg2 , Toast.LENGTH_SHORT).show(); startActivity(i); break; case 2: i.putExtra("key", 2); startActivity(i); break; case 3: i.putExtra("key", 3); startActivity(i); break; case 4: i.putExtra("key", 4); startActivity(i); break; case 5: i.putExtra("key", 5); startActivity(i); break; case 6: i.putExtra("key", 6); startActivity(i); break; case 7: i.putExtra("key", 7); startActivity(i); break; case 8: i.putExtra("key", 8); startActivity(i); break; } }
Thank you very much, and any help is appreciated.