By default my EditText has next view:
<EditText android:layout_height="wrap_content" android:paddingLeft="10dip"
android:layout_width="wrap_content" android:gravity="center_vertical"
android:inputType="textShortMessage"
android:id="@+id/search_string" android:background="@drawable/search_text_bg">
<requestFocus></requestFocus>
</EditText>
When I input text to it, it changes self size and background stretches. how to avoid it?
There are some attributes you need to set:
If you want to have single line edit text then do:
If you want to define maximum lines for edit text then do: