簡體   English   中英

Textview在Phone.linear布局上未顯示完整文本

[英]Textview not showing complete text on Phone.linear layout

我有線性layout.inside有textview。哪些一些包含大量信息。 在PC上,如果使用模擬器運行應用程序,則可以正常運行,但在電話上不會顯示整個文本。 左側的文本不見了,只顯示了1行。 我認為文字換行不起作用。

     android:scrollHorizontally="true"

android:ellipsize =“ end” android:ellipsize =“ marquee”

我累了,但沒有工作

請緊急幫助

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
<EditText  
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="@string/hello"
    android:id="@+id/Text1"
    />


</LinearLayout>

嘗試這個...

使用此代碼時,無需滾動屏幕。

只需將TextView放在ScollView中即可:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/white">
    <ScrollView android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:scrollbars="vertical"> 
        <TextView android:id="@+id/about_detail"
            android:layout_height="fill_parent"
            android:layout_width="match_parent"
            android:padding="2dp"
            android:textSize="16dp"
            android:textColor="@android:color/black"
            android:background="@color/white"/>
    </ScrollView>     
</LinearLayout>

希望這行得通\\

暫無
暫無

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

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