android - Scrollview - TextView limits in terms of numbers of lines -
my app doing logging , user have run days. in case end out having 100k lines of text scroll through.
this doesn't seem reasonnable. should see memory limits. how many lines of text maintain @ max?
can have rolling textview maintain last 1k lines of text? should textviewwith maxlines of 1k , scrollbar?
at moment have following xml:
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.narb.log.mainactivity"> <button android:id="@+id/btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerhorizontal="true" android:text="start" /> <scrollview android:id="@+id/sv" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="10dp" android:layout_below="@id/btn" > <textview android:id="@+id/txt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="this log number" android:layout_margin="15dp" /> </scrollview> </relativelayout>
if you, set max lines 100 , add read more option @ end of text , when user clicks that, set max lines textview.maxlines + 100 , hide read more when there no more text show.
Comments
Post a Comment