I have an onClickListener
set on a TextView
(mReadAgainButton
) which is supposed to reload a set of instructions from the beginning (initi
It is a bad idea to compare objects with the ==
operator. Try something like this instead:
public void onClick(View v) {
switch(v.getId()) {
case R.id.yourButton:
switch(mInstructionNumber) {
case 0:
case 1:
...
}
case R.id.ofmAssistInstrButton:
case R.id.ofmAssistInstrButton: //I think you made a typo here since they are the same name
default:
//your else statement stuff
...
}
}