I’m pretty sure there’s something wrong with this part of a switch statement, but I’m stumped, and I just need someone to have a look over it.
switch(buttonId)
{
/* LOTS OF CASES HERE */
default:
case R.id.goButton:
TextView rootNum = (TextView)findViewById(R.id.otherView);
String rootDone = rootNum.getText().toString();
it = Integer.parseInt(rootDone);
break;
}
Can you see anything wrong?
Update
Sorry about not posting the log, I though the problem would be obvious but it seems not so.
These are the two logcat errors:
java.lang.IllegalStateException: Could not find a method RootMe(View) in the activity class root.me.RootMeActivity for onClick handler on view class android.widget.Button with id 'goButton'
Caused by: java.lang.NoSuchMethodException: RootMe [class android.view.View]
I’ve solved it myself.
It was a typo, I mistyped the name of the method to be called onclick in the XML.
Thanks for all your help.