Is there a flag I can enable to permanently display the virtual keyboard in my app?

by me tun » Mon, 16 Mar 2009 23:32:18 GMT


Sponsored Links
 I want to permanently display the virtual keyboard in my application,
but it seems bound by focus to an edit text field.  Is there a way
around this?

Thanks!

--~--~---------~--~----~------------~-------~--~----~



Is there a flag I can enable to permanently display the virtual keyboard in my app?

by me tun » Tue, 17 Mar 2009 06:08:26 GMT


 In the InputMethodManager class, there seems to be a method
showSoftInput(view) @param view: The currently focused view, which
would like to receive soft keyboard input.  I have tried calling this
as follows:

        InputMethodManager imm = (InputMethodManager)
                getContext().getSystemService
(Context.INPUT_METHOD_SERVICE);
        imm.showSoftInput(mTextEntry);

But it seems to only work with an Edit Text view, I understand it
makes little sense to do so but is there a way I can have it
permanently raised for say an image view?



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Is there a flag I can enable to permanently display the virtual keyboard in my app?

by me tun » Tue, 17 Mar 2009 11:14:55 GMT


 Thanks Dianne, I've had a quick look through the code and have seen
how the onTouchEvent in the TextView Class has been modified to
display the soft keyboard if it is both focused and touched (how
profound).  I've managed to get it to display by clicking a button,
but really I'd like it called in OnCreate I think it has something to
do with the focusing, not sure but I'll look into it.







--~--~---------~--~----~------------~-------~--~----~



Is there a flag I can enable to permanently display the virtual keyboard in my app?

by me tun » Wed, 18 Mar 2009 10:47:31 GMT


 One can set, android:windowSoftInputMode="stateVisible"> in the
AndroidManifest...

Cheers.






--~--~---------~--~----~------------~-------~--~----~



Is there a flag I can enable to permanently display the virtual keyboard in my app?

by me tun » Mon, 23 Mar 2009 10:49:04 GMT


 y apologies for resurrecting this thread, but is it possible now to
not display the soft keyboard when the EditText view receives an on
touch event?

I've looked at IMM code and the closest thing I can find for doing
such a thing is hideSoftInputFromWindow(IBinder windowToken) but I'm
not too sure how to call it.

"Request to hide the soft input window from the context of the window
that is currently accepting input. This should be called as a result
of the user doing some actually than fairly explicitly requests to
have the input window hidden."

I've tried a couple of different things, and the only way I've been
able to hide the soft keyboard is by hacking the onTouchEvent method
the TextView class! And of course, I don't want to do this!

On Mar 18, 1:47pm, me tun <a...@tpg.com.au> wrote:
--~--~---------~--~----~------------~-------~--~----~



Is there a flag I can enable to permanently display the virtual keyboard in my app?

by blindfold » Thu, 30 Apr 2009 02:07:13 GMT


 > But it seems to only work with an Edit Text view, I understand it

I too am looking for a very simple way to just pop up a soft keyboard
for my graphical screen (being an ImageView), to next act as an
equivalent of onKeyDown() single character control like I use with the
physical keyboard. It looks like for a soft keyboard such a simple
thing cannot be done in a couple of statements, judging from a quick
glance at the softkeyboard SDK sample? I really don't like the
prospect of writing hundreds of lines of code to accomplish something
this basic.

Regards




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Issue of focus setting

Hi all,
I want to set default focus in the first focusable view when entering
a new screen, and i use view.requestFocus(View.FOCUS_DOWN) (view is
the root ViewGroup), but it doesn't work. The method alway return
false. And i also found a strange situation:  view.getFocusables
(View.FOCUS_DOWN) will return several focusabel views, but
view.focusSearch(View.FOCUS_DOWN) returns null. Then i try followed:
  ArrayList<View> al = view.getFocusables(View.FOCUS_DOWN);
 if(al != null && al.size() > 0)
  {
         al.get(0).requestFocus();
  }

It solves the problem, now can focus to the first focusable child
view. However it looks strange, and not smart. Do any one have any
other smart methods?
--~--~---------~--~----~------------~-------~--~----~

2. Opening an existing project

Hi all!!

I am new to the android world and java. I just successfully run the
Hello World app.

I would like to know that how can I open an existing project for
Android Eclipse IDE. It does not have any option for Open.

My RAM is 1.4GHz. My PC slowed down while running the Eclipse IDE. Is
an increase in RAM recommended?

Happy Coding,
Regards
--~--~---------~--~----~------------~-------~--~----~

3. Fling on ListView

4. How to get MemoryFile object from other process?

5. Remove binaries after I download and compile android source

6. Android STL

7. Remote debugger not connecting to DDMS