I have a text to be displayed in a text view. The text contains 200 lines of data, each line is having 10 characters. So total 2000 characters . The text view is inside a vertical scrollable view. The first 50 lines are not getting displayed . 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??
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. The first 50 lines are clipped off. Why??
no need of external scrollbar rather than u can use textview's property
android:scrollbars="vertical"
I think It will help u
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.