i want to allow only numbers and period(.) in a android edit text. How to do this .. can any body help?
You should use the att:
android:digits="0123456789."
http://developer.android.com/reference/android/widget/TextView.html#attr_android:digits
EditText is derived from TextView which has a
void addTextChangedListener(TextWatcher watcher)
method. TextWatcher has callbacks, like
abstract void afterTextChanged(Editable s)
that you can implement in order to filter the new text to only contain numbers and period.