What I did in the same situation was make one of the images in the
screen focusable (a property in the layout) and then when creating the
view in onCreate after the setContentView() call, called code like
this:
displayIcon = (ImageView)findViewById(R.id.your_image_widget);
displayIcon.requestFocus();
Then the keyboard does not show. Probably not perfect, but it worked
for me on the HTC Magic (G2).

On Aug 27, 8:17 pm, Muha <muhamadsu...@gmail.com> wrote:
>     Hi Durg,
>     I'm facing an opposite problem when the app is installed in a real
> device (a HTC G2). I want to open my screen with keypad hidden, but as
> the activity has an EditText which automatically receives focus, it
> triggers the opening of the keypad. As you did, I tried to put a
> similar code (see below) in onCreate() and onResume(), and tried also
> to send the focus to another view, but I didn't have success. On
> emulator, everything runs fine.
>
> InputMethodManager imm = (InputMethodManager) getSystemService
> (Context.INPUT_METHOD_SERVICE);
> imm.hideSoftInputFromWindow(meuEditText.getWindowToken(), 0);
>
>     Maybe my problem can solve your problem.
>
> Regards,
> Muha
>
> On Jul 23, 10:09 am, Durg <durga.n.pra...@gmail.com> wrote:
>
> > Automatic launch of VirtualKeypadin first screen(launcher) of
> > application
>
> > Hi All,
>
> > I have created an application with a EditText in first screen
> > (launcher). I want to launch this screen always with VirtualKeypad
> > Open. I know how to launch thekeypadon focus change or click. I have
> > tried the following code..
>
> > InputMethodManager inputManager = (InputMethodManager) getSystemService
> > (Context.INPUT_METHOD_SERVICE);
> > inputManager.showSoftInput(objEditText,
> > InputMethodManager.SHOW_FORCED);
>
> > in onCreate(), onPostCreate(), onStart(), onResume() and onPostResume
> > ().
>
> > But still virtualkeypadis not coming up. Please help me if there is
> > any API or Callback to call this function.
>
> > Thanks in advance.
>
> > Regards,
> > Durg.
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to