0
Force stopped
what is the reason for force stopped. I wrote an if statement for button but when there is nothing to do it will crash.
3 Antworten
0
could you please post the code so others can halp debug it.
0
public void cheak (View v){
String gn =edcheak.getText().toString();
int gnn = Integer.parseInt(gn);
String nc =String.valueOf(gnn);
edcheak.setText("");
if(gnn == zotopia){
tvcheak.setText("" + "«" + zotopia + "»" + "");
}else if (gnn > zotopia){
tvcheak.setText("");
}else if (gnn < zotopia){
tvcheak.setText("");
}else if(zotopia == 0){
Toast.makeText(this , "." ,Toast.LENGTH_SHORT).show();
}
}
0
if the EditText is empty when you click the button it will crash