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. More Map Troubles

I have been trying to get a MapActivty to run properly in me app for a few
days now. I have a class that extends MapActivity. I have my map api key
properly defined in the layout xml file.
I have built against the Google APi version 4? (whatever maps to android
1.6) I can compile fine but My app throws a ClassDefNotFound error for my
MyActivity class(the one that extends MapActivity
) I also added the uses-lib tag in the manifest. I have no idea what I'm
missing please help.

-- 

2. Sending huge files with HttpsUrlConnection???

I have some Android code that can send files to my webserver using an
HttpsUrlConnection, but when it tries to send larger files I get an
OutOfMemory exception when opening the OutputStream. Can anyone offer
some assistance?

It looks something like this:

httpConn = (HttpsURLConnection) new URL(uri).openConnection();
httpConn.setDoInput(true);
httpConn.setDoOutput(true);
httpConn.setUseCaches(false);
httpConn.setRequestMethod("POST");

This is where I try different things. The closes solution has been:
httpConn.setChunkedStreamingMode(1024);
In this case, I don't get the OutOfMemory immediately when opening the
OutputStream, but I see the heap growing as I os.write() and it
eventually runs out.

httpConn.connect();
OutputStream os = httpConn.getOutputStream();
byte[] buffer = new byte[4096];
int len;
while ((len = is.read(buffer)) != -1){
os.write(buffer, 0, len);
}
os.flush();

Each time I open the .getOutputStream() the contents of the file I am
trying to send is loaded into memory, per the discussion here (http://
bugs.sun.com/bugdatabase/view_bug.do?bug_id=4212479) -- so I go out of
memory.

My server supports HTTP 1.1. I've tried the following code.
1. httpConn.setRequestProperty("Transfer-Encoding","chunked");
2. httpConn.setChunkedStreamingMode(1024);
3. httpConn.setRequestProperty("Content-Length", length);
4. httpConn.setFixedLengthStreamingMode(1024)
5. Combo of 1+2.
6. Combo of 3+4

Can anyone offer any assistance?! It seems like no matter what, the
data going to the OutputStream is being buffered. ChunkedStreamMode
seems to just buffer it in pieces, whereas it would otherwise buffer
it all at once. Both go out of memory.

Thanks in advance.

PS> I have similar code for J2ME and memory has not been a problem.
Also, if I try to send two medium sized files in a row, the first one
makes it, but then the heap doesn't seem to compact and the second one
fails.

-- 

3. Transparent option menu buttons

4. Need rating spica vs hero

5. Join android forums to win a Jabra bt2080 bluetooth

6. Nexus one coming to Sprint

7. ANDROID_ID always null on devices