Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How to detect the if soft keyboard is visible on the screen
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  18 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Akshay Kulkarni  
View profile  
 More options Apr 19 2011, 4:49 am
From: Akshay Kulkarni <ak.androidm...@gmail.com>
Date: Tue, 19 Apr 2011 14:19:40 +0530
Local: Tues, Apr 19 2011 4:49 am
Subject: How to detect the if soft keyboard is visible on the screen

Hi,

Am trying to detect if the soft keyboard is active from the
ImputMethodManager, and the piece of code is as below ;

* InputMethodManager imm  =
(InputMethodManager)getActivity().getApplicationContext().getSystemService( Context.INPUT_METHOD_SERVICE);

        Log.e(TAG, "Result :"+imm.isActive());
*
But the above displays the result as "true" always.

Is there any way to find if the keyboard is active?

Thanks in advance.

Akshay


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Akshay Kulkarni  
View profile  
 More options Apr 20 2011, 12:15 am
From: Akshay Kulkarni <ak.androidm...@gmail.com>
Date: Wed, 20 Apr 2011 09:45:14 +0530
Local: Wed, Apr 20 2011 12:15 am
Subject: How to detect the if soft keyboard is visible on the screen

Hi,

Am trying to detect if the soft keyboard is active from the
ImputMethodManager, and the piece of code is as below ;

* InputMethodManager imm  =
(InputMethodManager)getActivity().getApplicationContext().getSystemService( Context.INPUT_METHOD_SERVICE);

        Log.e(TAG, "Result :"+imm.isActive());
*
But the above displays the result as "true" always.

Is there any way to find if the keyboard is active or visible?

Akshay


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shachar Shemesh  
View profile  
 More options Apr 20 2011, 12:47 am
From: Shachar Shemesh <shac...@shemesh.biz>
Date: Wed, 20 Apr 2011 07:47:37 +0300
Local: Wed, Apr 20 2011 12:47 am
Subject: Re: How to detect the if soft keyboard is visible on the screen

On 19/04/11 11:49, Akshay Kulkarni wrote:

> Hi,

> Am trying to detect if the soft keyboard is active from the
> ImputMethodManager, and the piece of code is as below ;

I believe you are on the wrong list. You need to try the development
support list (I think it's called android-developers - see
http://developer.android.com/community/index.html).

Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mariusz Saramak  
View profile  
 More options Apr 19 2011, 3:27 pm
From: Mariusz Saramak <mario...@gmail.com>
Date: Tue, 19 Apr 2011 21:27:06 +0200
Local: Tues, Apr 19 2011 3:27 pm
Subject: Re: How to detect the if soft keyboard is visible on the screen

Hi.
I hope I don't have right, but it is not possible.

I tried use several ways to check if software keyboard is on:

 1) android:configChanges="keyboardHidden|keyboard" properties in activity
AndroidManifest.xml, but it never handle onConfigurationChanged. (this
properties working only for hardware properties.)

2) I tried onMeasure method. (not working - but
protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)please
read http://developer.android.com/resources/articles/on-screen-inputs.html...
I used only

>> android:windowSoftInputMode=*adjustPan*
>> <activity name="EditContactActivity"
>>        android:windowSoftInputMode="stateVisible|adjustResize">
>>        ...
>>    </activity>

3) I found one way.
http://developer.android.com/reference/android/view/inputmethod/Input...
Methods *hideSoftInputFrom*  *return boolean value, true if close keyboard
is finished success, then I know if I have closed keyboard or not. If
keyboard was opened. (For me this working because I need info only if
keyboard was opened.).

Please write information if you will find better way to recognize keyboard
state or which solution you choose.
BR.

On 19 April 2011 10:49, Akshay Kulkarni <ak.androidm...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dianne Hackborn  
View profile  
 More options Apr 20 2011, 12:25 pm
From: Dianne Hackborn <hack...@android.com>
Date: Wed, 20 Apr 2011 09:25:21 -0700
Local: Wed, Apr 20 2011 12:25 pm
Subject: Re: How to detect the if soft keyboard is visible on the screen

Why do you want to know it is shown?  The IME being shown has little
meaning, since exactly how the IME behaves is up to it -- it may be a
transparent overlay and not impact the application, a small strip, or all
other kinds of things.

Due to this, the main way you interact with the IME is by setting your
softInputMode to be resizeable so when the IME says it wants to occlude part
of the screen your app's UI will get resized to take that into account if
needed.

On Tue, Apr 19, 2011 at 12:27 PM, Mariusz Saramak <mario...@gmail.com>wrote:

--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Quiring, Sam  
View profile  
 More options Apr 20 2011, 12:43 pm
From: "Quiring, Sam" <Sam.Quir...@windriver.com>
Date: Wed, 20 Apr 2011 16:43:55 +0000
Local: Wed, Apr 20 2011 12:43 pm
Subject: RE: How to detect the if soft keyboard is visible on the screen

Knowing if the IME is visible or not is a big deal if you are trying to test apps on the device with automation.  Causing a field to become visible like a user would before typing into it requires extra effort if you suspect/know the IME is being displayed.
When you click in a text field you need to wait for the keyboard to appear before starting to type -- how long do you wait if there is no way to explictily test?
When you hit the back button to ask the IME to go away, how long do you wait to know it is gone?

Yes, different IMEs exist, but during testing you can cause a particular one to come up and know its characteristics (transparent overlay, etc.)

-Sam

________________________________
From: android-platform@googlegroups.com [mailto:android-platform@googlegroups.com] On Behalf Of Dianne Hackborn
Sent: Wednesday, April 20, 2011 9:25 AM
To: android-platform@googlegroups.com
Subject: Re: How to detect the if soft keyboard is visible on the screen

Why do you want to know it is shown?  The IME being shown has little meaning, since exactly how the IME behaves is up to it -- it may be a transparent overlay and not impact the application, a small strip, or all other kinds of things.

Due to this, the main way you interact with the IME is by setting your softInputMode to be resizeable so when the IME says it wants to occlude part of the screen your app's UI will get resized to take that into account if needed.

On Tue, Apr 19, 2011 at 12:27 PM, Mariusz Saramak <mario...@gmail.com<mailto:mario...@gmail.com>> wrote:
Hi.
I hope I don't have right, but it is not possible.

I tried use several ways to check if software keyboard is on:

1) android:configChanges="keyboardHidden|keyboard" properties in activity AndroidManifest.xml, but it never handle onConfigurationChanged. (this properties working only for hardware properties.)

2) I tried onMeasure method. (not working - but
protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)
please read http://developer.android.com/resources/articles/on-screen-inputs.html because I used only

>> android:windowSoftInputMode=adjustPan
>> <activity name="EditContactActivity"
>>        android:windowSoftInputMode="stateVisible|adjustResize">
>>        ...
>>    </activity>

3) I found one way.
http://developer.android.com/reference/android/view/inputmethod/Input...
Methods hideSoftInputFrom*  return boolean value, true if close keyboard is finished success, then I know if I have closed keyboard or not. If keyboard was opened. (For me this working because I need info only if keyboard was opened.).

Please write information if you will find better way to recognize keyboard state or which solution you choose.
BR.

On 19 April 2011 10:49, Akshay Kulkarni <ak.androidm...@gmail.com<mailto:ak.androidm...@gmail.com>> wrote:
Hi,

Am trying to detect if the soft keyboard is active from the ImputMethodManager, and the piece of code is as below ;

 InputMethodManager imm  = (InputMethodManager)getActivity().getApplicationContext().getSystemService( Context.INPUT_METHOD_SERVICE);

        Log.e(TAG, "Result :"+imm.isActive());

But the above displays the result as "true" always.

Is there any way to find if the keyboard is active?

Thanks in advance.

Akshay

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-platform@googlegroups.com<mailto:android-platform@googlegroups.com> .
To unsubscribe from this group, send email to android-platform+unsubscribe@googlegroups.com<mailto:android-platform%2Buns ubscribe@googlegroups.com>.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-platform@googlegroups.com<mailto:android-platform@googlegroups.com> .
To unsubscribe from this group, send email to android-platform+unsubscribe@googlegroups.com<mailto:android-platform%2Buns ubscribe@googlegroups.com>.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

--
Dianne Hackborn
Android framework engineer
hack...@android.com<mailto:hack...@android.com>

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dianne Hackborn  
View profile  
 More options Apr 20 2011, 1:49 pm
From: Dianne Hackborn <hack...@android.com>
Date: Wed, 20 Apr 2011 10:49:02 -0700
Local: Wed, Apr 20 2011 1:49 pm
Subject: Re: How to detect the if soft keyboard is visible on the screen

Okay, wanting something for unit testing is very different than for regular
app development.

And honestly -- why do you want this?  Why do you care about what happens
when you send events to the IME?  Well not that you can anyway.  If you want
to test input, you should just directly send input to the app.

On Wed, Apr 20, 2011 at 9:43 AM, Quiring, Sam <Sam.Quir...@windriver.com>wrote:

--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lado Kumsiashvili  
View profile  
 More options Apr 20 2011, 2:01 pm
From: Lado Kumsiashvili <herrl...@gmail.com>
Date: Wed, 20 Apr 2011 20:01:00 +0200
Subject: Re: How to detect the if soft keyboard is visible on the screen

Hi.
I need this feature too. In an IME I'd like to use hardware keys, as example volume up and down keys for say to navigate through the text. But if ime is not being used, the keys must be passed through to be handeled further.

Lado
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Dianne Hackborn <hack...@android.com> wrote:

Okay, wanting something for unit testing is very different than for regular app development.

And honestly -- why do you want this?  Why do you care about what happens when you send events to the IME?  Well not that you can anyway.  If you want to test input, you should just directly send input to the app.

On Wed, Apr 20, 2011 at 9:43 AM, Quiring, Sam <Sam.Quir...@windriver.com> wrote:

Knowing if the IME is visible or not is a big deal if you are trying to test apps on the device with automation.  Causing a field to become visible like a user would before typing into it requires extra effort if you suspect/know the IME is being displayed.

When you click in a text field you need to wait for the keyboard to appear before starting to type -- how long do you wait if there is no way to explictily test?

When you hit the back button to ask the IME to go away, how long do you wait to know it is gone?

Yes, different IMEs exist, but during testing you can cause a particular one to come up and know its characteristics (transparent overlay, etc.)

-Sam

_____________________________________________
From: android-platform@googlegroups.com [mailto:android-platform@googlegroups.com] On Behalf Of Dianne Hackborn
Sent: Wednesday, April 20, 2011 9:25 AM
To: android-platform@googlegroups.com
Subject: Re: How to detect the if soft keyboard is visible on the screen

Why do you want to know it is shown?  The IME being shown has little meaning, since exactly how the IME behaves is up to it -- it may be a transparent overlay and not impact the application, a small strip, or all other kinds of things.

Due to this, the main way you interact with the IME is by setting your softInputMode to be resizeable so when the IME says it wants to occlude part of the screen your app's UI will get resized to take that into account if needed.

On Tue, Apr 19, 2011 at 12:27 PM, Mariusz Saramak <mario...@gmail.com> wrote:

Hi.
I hope I don't have right, but it is not possible.

I tried use several ways to check if software keyboard is on:

1) android:configChanges="keyboardHidden|keyboard" properties in activity AndroidManifest.xml, but it never handle onConfigurationChanged. (this properties working only for hardware properties.)

2) I tried onMeasure method. (not working - but

protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)

please read http://developer.android.com/resources/articles/on-screen-inputs.html because I used only

>> android:windowSoftInputMode=adjustPan >> <activity name="EditContactActivity"
>>        android:windowSoftInputMode="stateVisible|adjustResize">
>>        ...
>>    </activity> 3) I found one way.

http://developer.android.com/reference/android/view/inputmethod/Input...
Methods hideSoftInputFrom*  return boolean value, true if close keyboard is finished success, then I know if I have closed keyboard or not. If keyboard was opened. (For me this working because I need info only if keyboard was opened.).

Please write information if you will find better way to recognize keyboard state or which solution you choose.
BR.

On 19 April 2011 10:49, Akshay Kulkarni <ak.androidm...@gmail.com> wrote:

Hi,

Am trying to detect if the soft keyboard is active from the ImputMethodManager, and the piece of code is as below ;

 InputMethodManager imm  = (InputMethodManager)getActivity().getApplicationContext().getSystemService( Context.INPUT_METHOD_SERVICE);

        Log.e(TAG, "Result :"+imm.isActive());    

But the above displays the result as "true" always.

Is there any way to find if the keyboard is active?

Thanks in advance.

Akshay

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

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

--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

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

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

--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dianne Hackborn  
View profile  
 More options Apr 20 2011, 3:27 pm
From: Dianne Hackborn <hack...@android.com>
Date: Wed, 20 Apr 2011 12:27:54 -0700
Local: Wed, Apr 20 2011 3:27 pm
Subject: Re: How to detect the if soft keyboard is visible on the screen

On Wed, Apr 20, 2011 at 11:01 AM, Lado Kumsiashvili <herrl...@gmail.com>wrote:

> I need this feature too. In an IME I'd like to use hardware keys, as
> example volume up and down keys for say to navigate through the text. But if
> ime is not being used, the keys must be passed through to be handeled
> further.

Sorry, this doesn't make any sense to me.  IMEs don't consume volume keys.
 The application wouldn't care whether or not it was shown w.r.t. to volume
key dispatching.  Can you explain in more detail what you are trying to do?

--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lado Kumsiashvili  
View profile  
 More options Apr 20 2011, 6:26 pm
From: Lado Kumsiashvili <herrl...@gmail.com>
Date: Thu, 21 Apr 2011 00:26:30 +0200
Local: Wed, Apr 20 2011 6:26 pm
Subject: Re: How to detect the if soft keyboard is visible on the screen

Hi.

Well, I'd like to use this feature optionaly to enable KEY_LEFT or
KEY_RIGHT via Volume up/down keys. I think it could be quite usefull for
some users, which do not have
a D-Pad or hardware keyboard on their devices. Also the camera hardware
keyboard could be used say as "Paste" key.

Here is the issue for it in AnySoftKeyboard

http://code.google.com/p/softkeyboard/issues/detail?id=248

Lado

On 20/04/11 21:27, Dianne Hackborn wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dianne Hackborn  
View profile  
 More options Apr 20 2011, 7:52 pm
From: Dianne Hackborn <hack...@android.com>
Date: Wed, 20 Apr 2011 16:52:31 -0700
Local: Wed, Apr 20 2011 7:52 pm
Subject: Re: How to detect the if soft keyboard is visible on the screen

Wait are you saying you are writing an IME and want to do this key
translation?  If so...  um...  it's your IME, you know when it is displayed,
you have everything you need to know when to do what.

On Wed, Apr 20, 2011 at 3:26 PM, Lado Kumsiashvili <herrl...@gmail.com>wrote:

--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Akshay Kulkarni  
View profile  
 More options Apr 20 2011, 11:45 pm
From: Akshay Kulkarni <ak.androidm...@gmail.com>
Date: Thu, 21 Apr 2011 09:15:39 +0530
Local: Wed, Apr 20 2011 11:45 pm
Subject: Re: How to detect the if soft keyboard is visible on the screen

Hi,

There is a method isInputViewShown in InputMethodService which can be used
to check if the soft keyboard is visible or not. But can anyone tell how it
can be used in the code as unable to get the instance of the
InputMethodService and use the isInputViewShown method.

AK

On Thu, Apr 21, 2011 at 5:22 AM, Dianne Hackborn <hack...@android.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "who is responsible for licensing MP3, AAC, ...?" by bmjg
bmjg  
View profile  
 More options Apr 20 2011, 6:52 pm
From: "bmjg" <b...@home.nl>
Date: Thu, 21 Apr 2011 00:52:28 +0200
Local: Wed, Apr 20 2011 6:52 pm
Subject: who is responsible for licensing MP3, AAC, ...?

The Android platform comes with codecs for e.g. MP3 and AAC and sometimes
handset manufacturers/mobile phone providers add e.g. a WMA codec to the
platform.

Did they also take care of any license fees or is a developer of a audio /
video recorder / player or soundtrack enriched game using any of those
codecs still required to take care of licensing themselves?

Thanks.

- Benny


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "How to detect the if soft keyboard is visible on the screen" by Shri
Shri  
View profile  
 More options May 25 2011, 6:39 pm
From: Shri <shri.bo...@gmail.com>
Date: Wed, 25 May 2011 15:39:57 -0700 (PDT)
Local: Wed, May 25 2011 6:39 pm
Subject: Re: How to detect the if soft keyboard is visible on the screen
You can detect change in window size changed in #onMeasure with the
code sample at http://stackoverflow.com/questions/2150078/android-is-software-keyboa....

I was also looking for a way to detect the virtual keyboard because I
wanted to disable a timer to refresh a WebView if the user is entering
text in any of the text fields in the web page. However, I realized I
could use View#setOnKeyListener to listen for actual key presses since
that is what I actually care about - whether the user has typed in
text, not just whether the virtual keyboard is showing. Checking for
the virtual keyboard would be incorrect if the user attached an
external keyboard. I could try to handle all the cases of keyboard
types changes, but checking for key presses seems much more direct.

On Apr 20, 8:45 pm, Akshay Kulkarni <ak.androidm...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kalin Maldjanski  
View profile  
 More options Jul 14 2012, 9:44 pm
From: Kalin Maldjanski <djo...@djodjo.org>
Date: Sat, 14 Jul 2012 18:44:24 -0700 (PDT)
Local: Sat, Jul 14 2012 9:44 pm
Subject: Re: How to detect the if soft keyboard is visible on the screen

It is a bit old reply but Dear Dianne, in your answers i mostly see Why do
you want to this or that this way or the other way. This is not actually a
response.
The fact is that:
1) When IME is active the application can behave differently, especially on
KeyEvent.KEYCODE_DPAD_UP/DOWN. And as somebody said this is really
important in testing and not only 'unit' testing as you suggested.
2) There is no real straight forward way/method to find out if IME is
active or not. you have to monitor various events to be able to find this
out.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adrian O'Connor  
View profile  
 More options Aug 20 2012, 12:04 pm
From: Adrian O'Connor <adrian.ocon...@gmail.com>
Date: Mon, 20 Aug 2012 09:04:01 -0700 (PDT)
Local: Mon, Aug 20 2012 12:04 pm
Subject: Re: How to detect the if soft keyboard is visible on the screen

Just wanted to add my voice to this old thread too, for what it's worth.
The layout of our app (we have a main activity, with a toolbar at the
bottom, and fragments drive the main functionality in a smaller 'content
area'). This means that when the screen resizes due to the keyboard, we
need to hide the toolbar, else it just obscures the text area that caused
the keyboard to appear. We might also need to move the text area in to
view. I don't understand why there are apparently notifications for
hardware keyboard state changes, but not the soft-keyboard, seeing as the
soft keyboard is the only one that can impact our app?

I'm going to look at the onResize method to see if I can make that work
(I'd expect so). This is absolutely a genuine use-case -- we do the same
thing in our iOS version of the app and it works great there. iOS provides
notifications for keyboardDidAppear etc.

Many thanks,
Adrian O'Connor


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
aprof...@accucode.com  
View profile  
 More options Dec 26 2012, 1:43 pm
From: aprof...@accucode.com
Date: Wed, 26 Dec 2012 10:43:10 -0800 (PST)
Local: Wed, Dec 26 2012 1:43 pm
Subject: Re: How to detect the if soft keyboard is visible on the screen

I actually need this functionality so I can preserve the keyboard state
when the user is navigating between activities or there is an orientation
change, etc. We had to hide the keyboard in the onPause() method due to a
bug where if the soft key is open, then you open a new activity that
doesn't need the use of the soft key (no fields are present) it opens the
new activity as if it was sized with a soft key open. There is an ugly
black space in this case.

Granted if that was fixed I wouldn't even need this functionality
however getSoftKeyState() should exist regardless of this bug frankly.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
litchie  
View profile  
 More options Jun 6, 9:29 am
From: litchie <licha...@gmail.com>
Date: Thu, 6 Jun 2013 06:29:03 -0700 (PDT)
Local: Thurs, Jun 6 2013 9:29 am
Subject: Re: How to detect the if soft keyboard is visible on the screen

+1

On iOS, there is keyboardDidAppear / keyboardDidDisappear, which are very
useful, and obviously implemented for a good reason.

To the Google dev,  *STOP* questioning why developers want these, if you
are so stupid to understand, then just IMPLEMENT THE DAMN THING!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »