[英]Problems with horizontal scroll on multi line textview on android
I have problems with horizontal scrolls bars.我有水平滚动条的问题。 I am displaying information similar to a log in a textview.
我正在显示类似于 textview 中的日志的信息。
<View
android:layout_width="match_parent"
android:background="?android:attr/listDivider"
android:layout_height="2dp" />
<TextView
android:id="@+id/receive_text"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:freezesText="true"
android:gravity="bottom"
android:scrollbars="vertical|horizontal"
android:singleLine="false"
android:typeface="monospace"
android:textSize="16dp"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<View
android:layout_width="match_parent"
android:background="?android:attr/listDivider"
android:layout_height="2dp" />
I need all the information to be aligned to the timestamp but I am not achieving it.我需要将所有信息与时间戳对齐,但我没有实现。
Thank you in advance for helping me预先感谢您帮助我
Regards问候
The answer is here !答案就在这里!
Disable Word Wrap in an Android Multi-Line TextView 在 Android 多行 TextView 中禁用自动换行
setHorizontallyScrolling(boolean)
It's ok for me.对我来说还好。
Thanks !谢谢 !
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.