Ok, I think the right approach is not to pan but to resize. After
reading the docs for InputMethodManager I now have changed from

android:windowSoftInputMode="adjustPan" to
android:windowSoftInputMode="adjustResize" in the AndroidManifest,

the idea being that my Activity gets notified when the virtual
keyboard comes up - because it would be resized. Then I could change
my layout to displayt the views I need above the virtual keyboard on
the fly.

Problem now is: My Activity-Window doesn't get resized, or I haven't
found the right listener-method or I'm missing something else
altogether.

What I tried:
- I changed all my views and containers to layout_height=wrap_content
- I changed my window's layout_height to wrap_content
- I registered at several different methods, I even subclassed my
topmost relativelayout to get access to onLayout and such callbacks.

To no avail.

The only approach that was at least a little promising was registering
in my relative-layout-subclass in dispatchDraw and asking the canvas
for the cliprect. But that doesn't seem too reliable because other
effects than the virtual keyboard also affect the size cliprect.

It looks as if the virtual keyboard always gets displayed on top of my
layout and doesn't resize my layout at all. Even though setting
"adjustResize" in the manifest.

I'm on Android 1.6 and testing in the emulator. Any ideas about what I
may be missing?

Thanks         Ralf


On 25 Jan., 15:19, rflexor <[email protected]> wrote:
> Hi,
>
> is there any way to control the amount that the activity-window gets
> scrolled up when the virtual keyboard gets displayed? The default
> (when panning is enabled for that Activity in the Manifest) is to pan
> exactly that far so that the user can still see the EditText or
> whatever the user wants to edit.
>
> Now I have an EditText below said EditText that dynamically changes
> text if text gets entered into the EditText above. I'd like to scroll
> the window a little further up so that both EditTexts get displayed.
> And I don't want to use a ScrollView, just the normal mechanism that
> get's triggered when you open up the virtual keyboard.
>
> Any pointers to the right API are very welcome!
>
> Thank you             Ralf

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to