title: How to validate a number entered in the edittext? - android
body: <p>well am able to validate an edittext when its empty using the below code</p>
  
  <pre><code>EditText a = (EditText) findViewById(R.id.edittext1); 
  
  if ((a.getText().toString().equals(""))
  {
      Toast.makeText(getApplicationContext(), "value is empty", 0).show();
  }   
  </code></pre>
  
  <p>the <em>edittext</em> input type is set as number.</p>
  
  <p>now i want to validate the number entered.</p>
  
  <p>for example the range of number to be entered should be between 15 to 25.</p>
  
  <p>if the number is below 15 or above 25 it should show <strong>Out of Range</strong></p>
  
  <p>help me out! :)        </p>