gpt4 book ai didi

android edittext 不滚动

转载 作者:行者123 更新时间:2023-11-29 16:09:05 26 4
gpt4 key购买 nike

我有编辑文本。现在我的 edittext 正在包装内容,我不知道为什么,我希望它保持相同大小但可以滚动(垂直)。

<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设置文本

最佳答案

尝试在 ScrollView 中使用 EditText 或查看 this线程以使其以编程方式可滚动。

关于android edittext 不滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15071655/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com