UMAR-MOBITSOLUTIONS
UMAR-MOBITSOLUTIONS

Reputation: 77984

Is there any character limit in android textview?

I'm trying to enter more than 2000 - 3000 characters in an android TextView

it does not display anything.

any one guide is there character limit on android textview or what ?

Upvotes: 3

Views: 2235

Answers (2)

Rehan Sarwar
Rehan Sarwar

Reputation: 1004

Post your code might be your textview expand and fill the screen use Scrollview to handle this issue.

<ScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <TextView
        android:id="@+id/textView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:alpha="0.75"
        android:gravity="center_horizontal"
        android:textAppearance="@android:style/TextAppearance"
        android:textColor="@color/alert_dialog_heading_text_color"
        android:textSize="@dimen/text_size_for_subheading" />
</ScrollView>

Upvotes: 0

John Oleynik
John Oleynik

Reputation: 594

I did some small testing in G3, I found that: If there is a TextView in the activtiy layout, it can show more than 4096 characters, but when it owned by the item of listview, it just display invisible. So there's no hard limit, just what can be displayed depending on the device.

Upvotes: 1

Related Questions