简体   繁体   English

文本视图丢失要显示的字符[Android]

[英]Text view losing characters that is to be displayed [Android]

I have a text to be displayed in a text view. 我有一个要在文本视图中显示的文本。 The text contains 200 lines of data, each line is having 10 characters. 文本包含200行数据,每行包含10个字符。 So total 2000 characters . 因此共有2000个字符 The text view is inside a vertical scrollable view. 文本视图在垂直滚动视图的内部。 The first 50 lines are not getting displayed . 前50行未显示 If the text view had a limitation to the number of characters, then its fair enough if it loses the last few lines, but why is it taking off the head?? 如果文本视图对字符数有限制,那么如果它丢失了最后几行,那么它就足够公平了, 但是为什么它会掉头呢? . And also what is the limit on the number of characters for a text view?? 还有,文本视图的字符数限制是多少?

最缺少的前50行数据

向下拖动一些额外的可用空间(我猜可以容纳50行)

My code: 我的代码:

<ScrollView
        android:id="@+id/scroll_layout_ECG"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_above="@+id/btn_ECG"
        android:layout_alignLeft="@+id/btn_ECG"
        android:layout_alignStart="@+id/btn_ECG"
        android:layout_marginBottom="16dp"
        android:layout_marginTop="16dp" >

        <TextView
            android:id="@+id/tvECG_samples"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:gravity="center"
            android:hint="ECG\nsamples"
            android:textSize="25sp" />
    </ScrollView>

In the 1st screen shot, the data is being shown from 51st line. 在第一个屏幕截图中,数据从第51行开始显示。 The first 50 lines are clipped off. 前50行被剪掉。 Why?? 为什么??

no need of external scrollbar rather than u can use textview's property 不需要外部滚动条,而不是您可以使用textview的属性

                   android:scrollbars="vertical"

I think It will help u 我认为这会帮助你

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM