2011-06-06 80 views
6

這是我的問題。如何使文本不包裝?Android TextView Wrap

我已經試圖縮小文本。沒有工作。試圖做singleline="true"。下面是他做(2屏幕截圖6-7的TextView)

1截圖)這是我在Eclipse

2截圖發吧)這裏是如何showen在模擬器

Here is I made it in the Eclipse Here is how it showen in the emulator

+2

你應該顯示一些代碼。 – 2011-06-06 12:39:54

+0

沒有代碼...只有OnCreate startActivity – Sergio 2011-06-06 12:51:11

回答

4

嘗試將每個TextView設置爲android:ellipsizenone。有關此屬性的更多詳細信息,請參閱documentation

的XML:

<TextView ... android:ellipsize="none" /> 

從代碼:

TextView textView = new TextView(context); 
... 
textView.setEllipsize(null); 
+0

行..這工作 – Sergio 2011-06-06 12:50:27

3

嘗試給機器人:MAXLINES = 1 ... SINGLELINE財產也應該工作...

+0

沒有。因爲它削減了文本,並沒有顯示其餘的內容。 – 2014-12-31 15:15:54