簡體   English   中英

android textview中是否有任何字符限制?

[英]Is there any character limit in android textview?

我想在Android TextView中輸入超過2000 - 3000個字符

它沒有顯示任何東西。

任何一個指南都有android textview的字符限制或什么?

我在G3中做了一些小測試,我發現:如果在激活布局中有一個TextView,它可以顯示超過4096個字符,但是當它由listview項擁有時,它只顯示不可見。 所以沒有硬限制,只能根據設備顯示什么。

發布您的代碼可能是您的textview展開並填寫屏幕使用Scrollview來處理此問題。

<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>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM