friends,
i want to restrict " character in android EditText any one guide me how to achieve this in java code?
friends,
i want to restrict " character in android EditText any one guide me how to achieve this in java code?
You probably want to set an InputFilter on your EditText object
This page has an example of an InputFilter for numeric values
((EditText)findViewById(R.id.EditText01)).addTextChangedListener(new TextWatcher()
{
public void beforeTextChanged(CharSequence s, int start, int count, int after)
{
//check here if character is '"' if yes don't allow to right
}
public void onTextChanged(CharSequence s, int start, int before, int count)
{
}
@Override
public void afterTextChanged(Editable s)
{
// TODO Auto-generated method stub
}
});