[android-developers] Re: Can't get the softinput to show up programmatically

2009-06-10 Thread Bhargavi

Hi Jade,

  did u get a clue on this as iam also stuck with a similar
problem..please reply back if this issue is resolved. I too need the
softkeyboard to get displayed without touching the edit box in my
dialog .

Regards,
Bhargavi

On Jun 2, 8:53 pm, jade  wrote:
> We have a dialog box that includes an EditText field. We'd like the
> softkeyboard to already appear in the dialog when the dialog opens
> instead of the user first having to touch the EditText field. I've
> read other posts and tried to incorporate the suggestions but there's
> something that I'm missing.
>
> Here's my code from onStart (you'll notice that I'm calling several
> similar methods because from the documentation it's not clear :
>
>   protected void onStart() {
>       editText.setFocusable(true);    // which of these should I call?
>       editText.setFocusableInTouchMode(true);
>       editText.requestFocus();
>       editText.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN,
> KeyEvent.KEYCODE_MENU));
>       InputMethodManager imm = (InputMethodManager)
> this.context.getSystemService(Context.INPUT_METHOD_SERVICE);
>       imm.showSoftInput(editText, InputMethodManager.SHOW_FORCED);
>
>       //android.R.attr.windowSoftInputMode | stateAlwaysVisible); 
> //http://developer.android.com/reference/android/R.attr.html#windowSoft...
>       imm.showSoftInputFromInputMethod
> (editText.getApplicationWindowToken(),
> InputMethodManager.SHOW_FORCED);
>       super.onStart();
>    }
>
> }
>
> It seems like I might be able to use this type of  code
> programatically (due to our project constraints, we build this dialog
> programatically instead of via an xml file):   //
> android.R.attr.windowSoftInputMode  stateAlwaysVisible); 
> //http://developer.android.com/reference/android/R.attr.html#windowSoft...
>
> Any pointers would be appreciated!
>
> Jade
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Can't get the softinput to show up programmatically

2009-06-06 Thread Numan Ahmed
*-- On Mon, 6/7/09, numan <> wrote:

hello my friend how are u
latest sexy  summer fashion & hot fashion videos
visit my websitehttp://www.fashioninfokit.com/*

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---