ここで、またはこのレイアウトで何週間も抱えている問題を尋ねてきたので、今回は必要なものの写真を示します。
画面の下部に常にEditText と Button が必要です(キーボードが表示されるときは、キーボードの下にとどまらず、キーボードの上に表示する必要があります)。空き画面の残りの部分は、スクロール可能な TextView にする必要があります。
編集: これは、Romain の指摘に従って、現在のコードです。スクロール以外はすべて期待どおりに機能します。TextView はスクロール可能である必要がありますが、そうではありません。修正方法は?
<?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/consola"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scrollbars = "vertical"
android:height="0dip"
android:layout_weight="1.0"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="bottom">
<EditText
android:id="@+id/editText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<Button
android:text="Conectar"
android:id="@+id/boton"
android:label="@string/enviar_string"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</Button>
</LinearLayout>
</LinearLayout>