Note that there are some explanatory texts on larger screens.

plurals
  1. POPrevent expansion of EditText
    primarykey
    data
    text
    <p>I have the following the layout file</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;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"&gt; &lt;com.company.DrawView android:id="@+id/draw_view" android:layout_width="900dp" android:layout_height="500dp" android:layout_alignParentLeft="true" android:background="#CCCC00" /&gt; &lt;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"&gt; &lt;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" /&gt; &lt;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" /&gt; &lt;/LinearLayout&gt; &lt;/RelativeLayout&gt; </code></pre> <p>Whenever I set the focus on the EditText, it is expanding and filling up the top half of the screen and the soft keyboard is filling up the bottom half of the screen. What should I do retain the size of the EditText and show the soft keyboard?</p> <p>The intent is to capture the key strokes (on the soft keyboard) of the user and use it on another part of the application. </p> <p><strong>Edit 1:</strong> I'm using sdk-version 15 and I am on macbook if that helps. Adding the manifest file.</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.company" android:versionCode="1" android:versionName="1.0" &gt; &lt;uses-sdk android:minSdkVersion="15" /&gt; &lt;application android:icon="@drawable/ic_launcher" android:label="@string/app_name" &gt; &lt;activity android:name=".ChalkrText" android:label="@string/app_name" android:windowSoftInputMode="adjustNothing" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;/application&gt; &lt;/manifest&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload