2011-06-16 36 views
0

我有線性layout.inside有textview.which sometiomes包含大量信息。 在PC上如果運行應用程序與模擬器,它工作正常,但電話整個文本不顯示。 左側文字不見了,不能顯示,只顯示1行。 我認爲文字換行不起作用。Textview沒有在Phone.linear佈局上顯示完整的文本

 android:scrollHorizontally="true" 

機器人:ellipsize = 「結束」 機器人:ellipsize = 「跑馬燈」

我厭倦了這一點,但沒有工作

PLZ迫切需要幫助

+0

爲了清楚起見,您能向我們展示其中包含textview的佈局嗎? – Blundell 2011-06-16 08:14:30

回答

0

只要把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> 

希望這個作品\

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

嘗試......

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