2015-02-08 66 views
1

我有一個textview中的長文本。我想用水平滾動顯示全文3行。
例如,這是手機屏幕:Android TextView 3行與橫向滾動

 
!-------------! 
!    ! 
!    ! 
!    ! 
!    ! 
!    ! 
!    ! 
!-------------! 
!this is the text i want 3 lines and 
!with an horizontal scroll and carriages 
!return must be auto to fit in 3 lines max 
!<-- scroll --> 
!-------------! 

嘗試一切我能不成功......

+0

你可以試試'webview'代替 – 2015-02-08 23:54:05

回答

1
  1. 從字符串手動進行3行文本(用「\ n」替換3個空格) 。
  2. 把你的TextView與寬度= 「WRAP_CONTENT」 在HorisontalScrollView