Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void buttonClick (View v)
- {
- EditText num = (EditText) findViewById(R.id.ETnumber);
- EditText name = (EditText) findViewById(R.id.ETname);
- TextView tvNum = (TextView) findViewById(R.id.tvNumEnt);
- TextView tvName = (TextView) findViewById(R.id.tvNumEnt);
- int value = Integer.parseInt(num.toString());
- if (value > 10)
- {
- tvNum.setText("ERROR");
- num.setText("");
- }
- else if (value < 1)
- {
- tvNum.setText("ERROR");
- num.setText("");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement