У меня есть следующий файл макета
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res/com.company"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#CCCCCC"
android:orientation="horizontal"
android:id="@+id/main">
<com.company.DrawView
android:id="@+id/draw_view"
android:layout_width="900dp"
android:layout_height="500dp"
android:layout_alignParentLeft="true"
android:background="#CCCC00" />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/draw_view"
android:orientation="horizontal">
<Button
android:id="@+id/btn1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="10dp"
android:clickable="true"
android:onClick="buttonClicked"
android:text="button" />
<EditText
android:id="@+id/text1"
android:textSize="5dp"
android:inputType="text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.0"
android:maxWidth="5dp"
android:visibility="invisible"
android:gravity="bottom"
/>
</LinearLayout>
</RelativeLayout>
Всякий раз, когда я устанавливаю фокус на EditText, он расширяется и заполняет верхнюю половину экрана, а программная клавиатура заполняет нижнюю половину экрана. Что мне делать, чтобы сохранить размер EditText и показать программную клавиатуру?
Цель состоит в том, чтобы зафиксировать нажатия клавиш (на программной клавиатуре) пользователя и использовать их в другой части приложения.
Редактировать 1: я использую SDK версии 15 и Macbook, если это поможет. Добавление файла манифеста.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.company"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="15" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".ChalkrText"
android:label="@string/app_name"
android:windowSoftInputMode="adjustNothing" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>