I have EditText
view like this:
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="none"
android:background="@drawable/writting_field"
android:text="@string/test" />
But it stretches and fills parent. What is the problem?
The problem may be Image size will be bigger enough so it occupying like FILL_PARENT. To get override this , use 9Patch images. So that it takes as much size as of the Text.
If image size is same or bigger than parent it will automatically takes that much size , to take it fixed height width either you have to give it fixed height width in dp or try with ems option in edittext .