机器人的EditText不滚动 [英] android edittext is not scrolling
本文介绍了机器人的EditText不滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的EditText。现在我的EditText被包裹的内容,我不知道为什么,我希望它保持相同的大小,但可滚动(垂直)。
I have edittext. Now my edittext is wrapping content, i dont know why, i want it stay same size but be scrollable(vertical).
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/imageViewFull"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="10"
/>
<EditText
android:id="@+id/editTextFull"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="false"
android:ems="10"
android:lines="1"
android:maxLines="5"
android:cursorVisible="false"
android:scrollbars="vertical"
android:focusable="false"
android:focusableInTouchMode="false"
android:inputType="textMultiLine"
>
<requestFocus />
</EditText>
</LinearLayout>
和java中我设置的文本与的setText
And in java i set text with setText
推荐答案
尝试滚动型
使用的EditText
或采取一看<一个href=\"http://stackoverflow.com/questions/5831392/how-to-make-edittext-in-android-scrollable\">this线程使其编程滚动的。
Try using EditText
in ScrollView
or take a look at this thread to make it scrollable programmatically.
这篇关于机器人的EditText不滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文