Something like this may work for you?

Whenever key is pressed while firstNameEditText has focus, it will check 
the length of the string and if > 0 will enable the surnameEditText else it 
will be disabled you should initialise it disabled.

Damien

firstNameEditText.setOnKeyListener(new View.OnKeyListener()
{
    @Override    public boolean onKey(View v, int keyCode, KeyEvent event)
    {
        if(firstNameEditText.getText().toString().length() > 0)
        {
            surnameEditText.setEnabled(true);        }else        {
            surnameEditText.setEnabled(false);        }
    }
});


On Friday, July 4, 2014 4:49:00 PM UTC+9:30, Hiko wrote:
>
> Hello,
>
> If nothing is input on EditText area, I want to set the android:imeOption 
> area to "DISABLE" on the soft keyboard.
> on opposite side, if any character is input there, I want to set that area 
> to "ENABLE" as well.
>
> is it possible?
> if yes, i would like to know how to implement that.
>
> Thank you. 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to