如何更改HorizontalScrollView原来的手势功能
燚㵘䲜 2010-12-08 11:43:35
在界面中手势时,在原先的功能上更改一些性能,
如左右拖时,把边上空的部分去掉,
还有拖到哪个位置时获取当前字符的位置坐标,
另一个是增加滚动功能和控制滚动速度。
增加后保持愿有滚动效果。
还有不知能否实现控制HorizontalScrollView,让它按一定的速度滚动前进。
我应重载那个方法或类即可实现上述所需的滚动功能?
不知下面写的布局是否合理。
<HorizontalScrollView android:id="@+id/hscroll"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbars="none"
android:background="#0FF"
android:paddingTop="10dip"
android:paddingBottom="10dip">
<TextView android:id="@+id/textLineMsg"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="The quick brown fox jumped over the lazy dog."
android:textSize="100px"
android:textColor="#D33"
android:background="#050"
android:singleLine="true"
android:ellipsize="marquee"
android:paddingTop="10dip"
android:paddingBottom="10dip"
android:scrollHorizontally="true"
android:fadingEdge="horizontal"
android:fadingEdgeLength="100dip"
android:layout_centerInParent="true">
</TextView>
</HorizontalScrollView>