android - How to fix this text input in relative layout -


i have xml :

<relativelayout     android:id="@+id/relativelayout1"     android:layout_width="fill_parent"     android:layout_height="wrap_content" >      <button         android:id="@+id/button1"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignparentbottom="true"         android:layout_alignparentright="true"         android:text="@string/button1" />      <edittext         android:id="@+id/edittext1"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignparentbottom="true"         android:layout_alignparentleft="true"         android:layout_aligntop="@+id/button1"         android:layout_toleftof="@+id/button1"         android:ems="10"         android:inputtype="textmultiline" /> </relativelayout> 

and view :

enter image description here

how can fix that?

the problem using android:ems attribute, sets exact width textview (measured in ems).

this overrides android:layout_width="wrap_content", , text in edittext overflows.

i'm guessing wanted set size of text, should done using android:textsize , sp units.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -