title: How to limit EditText to input only float values in Java?
body: <p>I have found answers to limit it to Integer/float in xml, I want to do it programmatically. 
  I can set <code>setInputType(InputType.TYPE_CLASS_NUMBER)</code> for integer values, but what for float values? </p>
  
  <p>I want them in <code>xxxx.xxx</code> format. </p>