I have edittext. Now my edittext is wrapping content, i dont know why, i want it stay same size but be scrollable(vertical).
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/imageViewFull"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="10"
/>
<EditText
android:id="@+id/editTextFull"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="false"
android:ems="10"
android:lines="1"
android:maxLines="5"
android:cursorVisible="false"
android:scrollbars="vertical"
android:focusable="false"
android:focusableInTouchMode="false"
android:inputType="textMultiLine"
>
<requestFocus />
</EditText>
</LinearLayout>
And in java i set text with setText
use:
Have you tried to set your
layout_height="wrap_content"
?this works for me:
i have set the height by
android:layout_height="200dp"
Try using
EditText
inScrollView
or take a look at this thread to make it scrollable programmatically.