N3ur0t
Lurker
boolean fin1, fin2, fin3;
@override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == 79) {
count++;
Log.e("count = ", String.valueOf(count));
if (count == _1) {
fin1 = true;
count = 0;
}//end if1.1
else if (count == _2) {
fin2 = true;
count = 0;
}//end if1.2
else if (count == _3) {
fin3 = true;
count = 0;
}//end if1.3
return true;
}//end if1
if (fin1 && fin2 && fin3) {
Log.e("third time", String.valueOf(fin3));
finish();
}//end if2
return super.onKeyUp(keyCode, event);
}
the block are good ordered? I need put the three boolean comparision in a method and goes into the onCreate or outside? the return super.blahblah goes in a else{}?
@override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == 79) {
count++;
Log.e("count = ", String.valueOf(count));
if (count == _1) {
fin1 = true;
count = 0;
}//end if1.1
else if (count == _2) {
fin2 = true;
count = 0;
}//end if1.2
else if (count == _3) {
fin3 = true;
count = 0;
}//end if1.3
return true;
}//end if1
if (fin1 && fin2 && fin3) {
Log.e("third time", String.valueOf(fin3));
finish();
}//end if2
return super.onKeyUp(keyCode, event);
}
the block are good ordered? I need put the three boolean comparision in a method and goes into the onCreate or outside? the return super.blahblah goes in a else{}?