[英]Text view losing characters that is to be displayed [Android]
我有一個要在文本視圖中顯示的文本。 文本包含200行數據,每行包含10個字符。 因此共有2000個字符 。 文本視圖在垂直滾動視圖的內部。 前50行未顯示 。 如果文本視圖對字符數有限制,那么如果它丟失了最后幾行,那么它就足夠公平了, 但是為什么它會掉頭呢? 。 還有,文本視圖的字符數限制是多少?
我的代碼:
<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>
在第一個屏幕截圖中,數據從第51行開始顯示。 前50行被剪掉。 為什么??
不需要外部滾動條,而不是您可以使用textview的屬性
android:scrollbars="vertical"
我認為這會幫助你
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.