如何更改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>
...全文
230 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
greenboy123456789 2011-11-08
  • 打赏
  • 举报
回复
楼主,问题解决没有?

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧