Sure! I built a simple example that looks something like my app layout:
<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout android:id="@+id/RelativeLayout01"
android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android";>
<RelativeLayout android:id="@+id/RelativeLayout02"
android:layout_height="wrap_content" android:layout_width="fill_parent"
android:layout_alignParentTop="true"><TextView android:text="TextView01"
android:id="@+id/TextView01" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"></TextView>
</RelativeLayout>
<RelativeLayout android:layout_below="@+id/RelativeLayout02"
android:id="@+id/RelativeLayout03" android:layout_width="fill_parent"
android:layout_height="fill_parent"><EditText android:text="EditText01"
android:id="@+id/EditText01" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"></EditText>
</RelativeLayout>
</RelativeLayout>

and the onCreate() method:
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);

  //this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);

this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);

  this.setContentView(R.layout.main);

  EditText editor = (EditText)findViewById(R.id.EditText01);
  editor.setImeOptions(EditorInfo.IME_ACTION_DONE);
  }

Don't use ADJUST_PAN, but ADJUST_RESIZE. That's the one not working :). If
you leave the code as is the window will resize and my EditText will be
centered above the keyboard. If I uncomment that line of code the mode will
reset to ADJUST_PAN even though I explicitly ask for resizing.
Thanks!

On Tue, Aug 18, 2009 at 7:39 PM, Balwinder Kaur (T-Mobile USA) <
[email protected]> wrote:

>
> Could you please post your layout xml file to help reproduce the
> problem. Meanwhile...
>
>     this.getWindow().addFlags
> (WindowManager.LayoutParams.FLAG_FULLSCREEN);
>     this.getWindow().setSoftInputMode
> (WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
>
> did work for me for a vertical layout with a bunch of UI elements in
> it.
>
> Balwinder Kaur
> Open Source Development Center
> ·T· · ·Mobile· stick together
>
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
>
> On Aug 18, 3:04 am, loctarar <[email protected]> wrote:
> > Hello!
> >
> > I've noticed some incompatibility between these two functions.
> > public void onCreate(Bundle savedInstanceState) {
> >      super.onCreate(savedInstanceState);
> >      this.getWindow().addFlags
> > (WindowManager.LayoutParams.FLAG_FULLSCREEN);
> >      this.getWindow().setSoftInputMode
> > (WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
> >      .....
> >
> > }
> >
> > Enabling the fullscreen flag seems to disable the soft input adjust
> > mode. I looked through the source code of the two functions but I
> > coulnd't find anything that might cause this.
> >
> > Any suggestions?
> > Thanks!
> >
>

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