希望有人能说清楚。
我目前有一个 ScrollView(vert), TableLayout 以编程方式添加到其中,向TableLayout添加了TableRow,其中添加了TextView以及其他类似视图。
问题是这个文本可能比屏幕更长,我需要一种方法使TextView中的文本自动滚动无限次。
请注意,可能会有相当多的表行添加到一个表格布局中。
答案 0 :(得分:0)
如果您只想要像选框一样的水平滚动,那么下面是代码
<TextView
android:text="START | lunch 20.00 | Dinner 60.00 | Travel 60.00 | Doctor 5000.00 | lunch 20.00 | Dinner 60.00 | Travel 60.00 | Doctor 5000.00 | END"
android:id="@+id/MarqueeText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:paddingLeft="15dip"
android:paddingRight="15dip"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true">
如果您想要自定义MSDN page。希望这对你有用。