Here I have EditText and ImageButton:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/layout1"
android:weightSum="1.0">
<EditText
android:id="@+id/searchBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/search"
android:layout_weight=".86"
android:textStyle="italic|normal"
android:typeface="normal"
android:singleLine="true"
android:ellipsize="end" />
<ImageButton
android:layout_height="match_parent"
android:layout_width="0px"
android:layout_weight=".14"
android:background="@drawable/search_button_selector"/>
</LinearLayout>
Everything seems to be OK, unless I start typing text in EditText.
At the beginning it looks like this:

And after typing text, my ImageButton gets smaller:

How to make EditText stand still?
I believe changing the EditText’s layout_width to
android:layout_width="0dp"will fix it. This will allow the LinearLayout to control the width to fill the space dictated by your weights.