I need to validate my edit text, I google it and find some links,but still couldn't get what I really want.
I need to validate the edit text input in android to allow decimal numbers,whole numbers and positive numbers,It won't allow only the characters (.
,/
,$
) and spaces.
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number"
android:ems="10"
/>
I tried like this,but couldn't enter decimal number also.
I refer this link also http://developer.android.com/reference/java/util/regex/Pattern.html, still couldn't do.