HeHe,

I added that line to my activity, and I still get the virtual keyboard after the return key is pressed.  Pressing the return key only adds a new line to my EditText.  Did I implement it improperly?  Here is a sample piece of code testing the functionality:


public class Login extends Activity {

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.login);
       
        EditText usernameEditText = (EditText)findViewById(R.id.usernameVal);
        
        ((InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(usernameEditText.getWindowToken(),
                0);
       
    }
}

Thanks,

Dan



On Apr 7, 2010, HeHe <[email protected]> wrote:

--
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
 
To unsubscribe, reply using "remove me" as the subject.

Reply via email to