public void buttonClick(View v){
String id = (v.getResources().getResourceName(v.getId())).spli t("/")[1];
switch(id){
case "Plus":
num1 = Double.parseDouble(Display.getText().toString());
operator = Plus.getText().charAt(0);
Display.setText(null);
break;
case "Minus":
num1 = Double.parseDouble(Display.getText().toString());
operator = Minus.getText().charAt(0);
Display.setText(null);
break;
case "Mult":
num1 = Double.parseDouble(Display.getText().toString());
operator = mult.getText().charAt(0);
Display.setText(null);
break;
case "Division":
num1 = Double.parseDouble(Display.getText().toString());
operator = division.getText().charAt(0);
Display.setText(null);
break;
case "Sqrt":
num1 = Double.valueOf(Display.getText().toString());
break;
case "Percent":
num1 = Double.valueOf(Display.getText().toString());
case "Equals":
num2 = Double.parseDouble(Display.getText().toString());
if(operator == '+'){
total = num1+ num2;
total = Double.parseDouble(Display.getText().toString());
}else if(operator == '-'){
total = num1-num2;
total = Double.parseDouble(Display.getText().toString());
}else if(operator == '\u00D7'){
total = num1*num2;
total = Double.parseDouble(Display.getText().toString());
}else if(operator == '\u00f7'){
total=num1/num2;
total = Double.parseDouble(Display.getText().toString());
}else if(operator == '%'){
total double ) num1)*100;
}else
total=Math.sqrt(num1);
total=Double.parseDouble(Display.getText().toStrin g());
break;
case "Decimal":
if(num1=='0') {
Display.setText("0" + "." + "num1");
}
else
Display.setText("num1"+"."+"num1");
break;
case "AC":
Display.setText("0");
break;
default:
if(number.equals(one)) {
isValid = true;
if(number.equals(firstNumber)){
Display.setText(Display.getText().toString()+ "1");}
else{
Display.setText(Display.getText().toString()+"1");
}
}else if(number.equals(two)){
if(number.equals(firstNumber)){
Display.setText(Display.getText().toString()+ "2");}
else
Display.setText(Display.getText().toString()+"2");
}else if(number.equals(three)){
if(number.equals(firstNumber)){
Display.setText(Display.getText().toString()+"3"); }
else
Display.setText(Display.getText().toString()+"3");
}else if(number.equals(four)){
if(number.equals(firstNumber)){
Display.setText(Display.getText().toString()+"4"); }
else
Display.setText(Display.getText().toString()+"4");
}else if(number.equals(five)){
if(number.equals(firstNumber)){
Display.setText(Display.getText().toString()+"5"); }
else
Display.setText(Display.getText().toString()+"5");
}else if(number.equals(six)){
if(number.equals(firstNumber)){
Display.setText( Display.getText().toString()+"6");}
else
Display.setText(Display.getText().toString()+"6");
}else if(number.equals(seven)){
if(number.equals(firstNumber)){
Display.setText(Display.getText().toString()+ "7");}
else
Display.setText(Display.getText().toString()+"7");
}else if(number.equals(eight)){
if(number.equals(firstNumber)){
Display.setText( Display.getText().toString()+"8");}
else
Display.setText(Display.getText().toString()+"8");
}else if(number.equals(nine)){
if(number.equals(firstNumber)){
Display.setText( Display.getText().toString()+"9");}
else
Display.setText(Display.getText().toString()+"9");
}else{
if(number.equals(firstNumber)){
Display.setText(Display.getText().toString()+"0"); }
else
Display.setText(Display.getText().toString()+"0");
}