Input Method Engine(IME)表示時に、アクティビティーを伸縮させる方法について。
例えば、下図のような(テキスト、エディット、ボタンの順に配置された)レイアウトを例に説明します。

画面中央のエディットボックスにフォーカスをあてると、IME(ここでは Simeji) が表示されるのですが、
通常では、下図のように画面下半分が隠れてしまい、アクティビティー全体が表示されません。
この結果、画面下部に配置したボタンが操作できなくなってしまいます。
そこで、IME 表示時にアクティビティーを伸縮させるには、
AndroidManifest.xml ファイルの対象のアクティビティに「android:windowSoftInputMode="adjustResize"」を指定します。
すると、下図のように IME 以外の残りの領域が、アクティビティー全体にレイアウトされます。
この結果、アクティビティー画面下部に配置していたボタンを操作することができます。

(上記説明で使用した)サンプルソースコード
- AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
...>
<application android:icon="@drawable/icon"
android:label="@string/app_name">
<activity android:name=".UpdateStatusActivity"
android:windowSoftInputMode="adjustResize" />
</application>
...
</manifest>
- res/layout/update_status.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView android:id="@+id/textview_remain_status_length"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="right" />
<EditText android:id="@+id/edittext_status_text"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:gravity="top"
android:hint="@string/whats_happening" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button android:id="@+id/button_update"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/update" />
<Button android:id="@+id/button_cancel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/cancel" />
</LinearLayout>
</LinearLayout>
