禁用自动换行在Android多行的TextView换行、Android、TextView

由网友(每①天都是↗开始)分享简介:我工作了一个月查看了先进的刷卡(需要电流,下一个和previous加载,让每个视图坚持你的手指),这意味着我有很多意见,导致事情要一点点有点慢。I am working on a Month View with an advanced swipe (requires current, next and previou...

我工作了一个月查看了先进的刷卡(需要电流,下一个和previous加载,让每个视图坚持你的手指),这意味着我有很多意见,导致事情要一点点有点慢。

I am working on a Month View with an advanced swipe (requires current, next and previous to be loaded to allow each view to stick to your finger) which means I have many views which causes things to be a little bit slow.

            |          | #<-- screen bounderies
 ' previous ' current  '   next   ' #<-- three months loaded
    ' previous ' current  '   next   ' #<-- three months when the user drags their finger

由于这一点,我想重新present多个事件在一个单一的TextView的。当用户点击月视图(小屏幕)的日子之一,它会打开日视图的那一天。

Because of this I want to represent multiple events in a single TextView. When the user taps one of the days on the Month View (small screen), it will open the day view for that day.

在每一天在月视图(通常是一天获取屏幕宽度的七分之一和不到七分之一垂直)我想避免这种

On each day in the month view (typically a single day gets one seventh of the width of the screen and a little less than one seventh vertically) I would like to avoid this

|    31|
|10a:  |
| Testi|
|ng    |
|11a:  |

相反,我想

|    31|
|10a:  |
| Testi|
|11a:  |
| Anoth|

请注意,纳克被切断而不是换到下一行了。这是我所期待的。

Notice that the ng is cut off instead of wrapping to the next line. This is what I am looking for.

推荐答案

在Java的:

setHorizontallyScrolling(boolean) 

在理论上,机器人:scrollHorizo​​ntally应XML做同样的,但有是停止它的工作在Android中的错误

In theory, android:scrollHorizontally should do the same in XML, but there is a bug in android that stops it working.

阅读全文

相关推荐

最新文章