This method is called at button click because of assigned name to the "OnClick property" of the button,what should be the correct code of case in below coding.it giving error that it should be constant expression in case.
public void onClick(View view) {
switch (view.getId()) {
case R.id.button1:
RadioButton AButton = (RadioButton) findViewById(R.id.radio0);
RadioButton BButton = (RadioButton) findViewById(R.id.radio1);
if (text.getText().length() == 0) {
Toast.makeText(this, "Please enter a valid number",
Toast.LENGTH_LONG).show();
return;
}