title: How to input a fractional number?
body: <p>I'm beginner in Java Android developing. I'm using Eclipse SDK 3.6.1 version. I'm trying to do a simple calculator. I have one problem how to input a fractional number? 
  There is my code:</p>
  
  <pre><code>@Override
  public void onClick(View view) {
    switch (view.getId()) {      
  
       case R.id.btnNum0Id:
       case R.id.btnNum1Id:
       case R.id.btnNum2Id:
       case R.id.btnNum3Id:
       case R.id.btnNum4Id:
       case R.id.btnNum5Id:
       case R.id.btnNum6Id:
       case R.id.btnNum7Id:
       case R.id.btnNum8Id:
       case R.id.btnNum9Id:
  
          String inDigit = ((Button)view).getText().toString(); 
          if (inStr.equals("0")) {  
             inStr = inDigit;    
          } else {
             inStr += inDigit;   
          }
          tekstas.setText(inStr);
  
          if (Operator == '=') {
             rezult = 0;
             Operator = ' ';
          }
          break;            
  
       case R.id.btnAddId:
          aritmetika();
          Operator = '+';
          break;
       case R.id.btnSubId:
           aritmetika();
          Operator = '-';
          break;
       case R.id.btnMulId:
           aritmetika();
          Operator = '*';
          break;
       case R.id.btnDivId:
           aritmetika();
          Operator = '/';
          break;
       case R.id.btnSqrtId:
           aritmetika();
           Operator = 'a';
           break;
       case R.id.btnEqualId:
           aritmetika();
          Operator = '=';
          break;
       case R.id.dot:
           aritmetika();
          Operator = '.';
          break;  
  
       case R.id.btnClearId:   
          rezult = 0;
          inStr = "0";
          Operator = ' ';
          tekstas.setText("0");
          break;
    }
  
     } 
  
  
  
  private void aritmetika() {
    int inNum = Integer.parseInt(inStr);
  
    if (Operator == ' ') {
       rezult = inNum;
    } else if (Operator == '+') {
       rezult += inNum;
    } else if (Operator == '-') {
       rezult -= inNum;
    } else if (Operator == '*') {
       rezult *= inNum;
    } else if (Operator == '/') {
       rezult /= inNum;
    } else if (Operator == 'a') {          
           rezult = (float)Math.sqrt(rezult);             
    } else if (Operator == '.') {
        String rezult2 = inStr+'.';     
        //need fractional number
    } else if (Operator == '=') {
       // tolesnis veiksmas
    }
    tekstas.setText(String.valueOf(rezult));
     }
  }
  </code></pre>
  
  <p>I'm thinking how to make a fractional number.    </p>