I am working on an Android application in which I am using edit text. When I put long text in it, it increase the size of the edit text. I having already given "wrap_content"
on width and limit the number of lines and 'ems'
but it won't work.
When I put long text or short text it increases or decreases the size of edit text. I have post the XML code and snapshot of my problem.
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_weight="1"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/fname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" First Name:"
android:textColor="@color/Black"
android:textSize="12sp" />
<EditText
android:id="@+id/fnametxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/Beige"
android:enabled="false"
android:lines="1"
android:ems="15"
android:maxLines="1"
android:scrollHorizontally="true"
android:singleLine="true"
android:text="ufyufgiuhjlkh"
android:textColor="@color/Black"
android:textSize="12sp" />
</LinearLayout>