The layout that your views are in should get a call to onSizeChanged()
with the new sizes.

I had exactly the same issue a few months ago.  My solution was to
place my View implementation in a ScrollView and override
ScrollView.onSizeChanged() to do stuff that I needed when the IME was
shown/hidden.

On Apr 23, 7:50 am, mkellner <m.kin...@gmail.com> wrote:
> Alas, onSizeChanged() doesn't get called when the IME is invoked or
> dismissed.
>
> My manifest contains:
>                                   android:windowSoftInputMode="adjustResize"
> as suggested.
>
> My main window is a SurfaceView.
> I also have an EditText view.
> When I need to open the keyboard, I make the EditText visible and
> toggleSoftInput.
>
> The keyboard appears, but no onSizeChanged() is called for either the
> EditText view or the SurfaceView.
>
> Any suggestions?
>
> -mk
>
> On Apr 22, 10:26 pm, jamesc <jame...@gmail.com> wrote:
>
>
>
> > onSizeChanged() - the system resizes the window when the IME is shown/
> > hidden. Take a look here:
>
> >http://groups.google.com/group/android-developers/browse_thread/threa...
>
> > On Apr 22, 3:40 am, mkellner <m.kin...@gmail.com> wrote:
>
> > > Hello,
>
> > > I am trying to find a way to get a notification that the soft keyboard
> > > has been dismissed by the user pressing the "Back" key.
>
> > > showSoftInput() with a ResultReceiver will tell you if/when the
> > > keyboard appears, but not if it goes away.
>
> > > addTextChangedListener() doesn't get called because text hasn't
> > > changed.
>
> > > onEditorAction() doesn't get called, because the Action button wasn't
> > > pressed.
>
> > > dispatchKeyEvent() doesn't get called with KEYCODE_BACK.
>
> > > onConfigurationChanged() doesn't get called even with this in the
> > > manifest:
> > >                   android:configChanges="keyboardHidden|orientation|
> > > locale|screenLayout|fontScale"
>
> > > Any suggestions?
>
> > > Thanks!
> > > -mk
>
> > > --
> > > 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 
> > > athttp://groups.google.com/group/android-developers?hl=en
>
> > --
> > 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 
> > athttp://groups.google.com/group/android-developers?hl=en
>
> --
> 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 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
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