Hi, How to call android keyboard using keyboard.
i have a android browser, where when u typing a url, how to invoke the virtual keyboard. I have no mouse. Thanks and Regards, HarishKumar.V On Wed, Aug 5, 2009 at 3:50 PM, for android <forandr...@gmail.com> wrote: > I wanted to get a virtual keyboard on click of a button and when the button > takes focus.the following code works only for on focus,but does not work for > the onClickListner. > > How do I get the virtual keyboard on click of a button?Any help > > > --------------------------------------------------------------- > final Button button = new Button(this); > > //button.requestFocusFromTouch(); > button.setOnFocusChangeListener(new OnFocusChangeListener(){ > > public void onFocusChange(View view, boolean hasFocus) { > if(hasFocus){ > final InputMethodManager imm = > (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); > imm.showSoftInput(view, 0); > } > > } > > }); > button.setOnClickListener(new OnClickListener() { > > public void onClick(View v) { > final InputMethodManager imm = > (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); > imm.showSoftInput(v, 0); > > } > > }); > ---------------------------------------------------------------- > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---