开发者

Constraint the EditText

I want to do the following thing: be not able t开发者_开发知识库o resize the EditText widget. Because when I enter a long string, all my layout structure is crashing down, because the EditText occupies the whole screen. Any suggestions?


Use singleLine and Layoutwidth(with fix size) property together. See this:

<EditText 
    android:text="ok" 
    android:id="@+id/EditText01" 
    android:layout_width="300dip" 
    android:layout_height="wrap_content"
    android:singleLine="true"
    ></EditText> 

Try this.


Firstly define Scroll then Layout and then EditText. Like This

<?xml>
<ScrollView>
<LinerLayout>
<EditText/>
<LinerLayout/>
</ScrollView>

I hope you will find solution.


make the EditText to be in a single Line.. here is an example.

 <EditText android:id="@+id/InscripChampNom"
           android:layout_height="wrap_content" 
           android:textSize="14px"
           android:inputType="textPersonName" 
           android:layout_marginRight="20dip"

           android:singleLine="true" ---->HERE

           android:textColor="@color/background">

  </EditText>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜