滚动horizo​​ntalScrollView左右 [英] Scroll horizontalScrollView left-right

查看:193
本文介绍了滚动horizo​​ntalScrollView左右的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

,我还需要在点击左右滚动button.I头左右已经使用了一些code,它在滚动从右到成功合作离开,但我无法左右滚动到right.please建议我如何解决这个

I'm using HorizontalScrollView for show header in my app,I also need to scroll header left-right on clicking on left-right button.I have used some code that is working successfully in scrolling right-to-left but i'm unable to scroll left-to-right.please suggest me how to solve this

我的code为向右滚动至左

    horiScrollView.scrollBy(20, 20);

请建议我如何解决这个problem.Thanks

please suggest me how to solve this problem.Thanks

推荐答案

请第一个数字为负。正确的号码不会做任何事情(它的垂直变化)。第一个数字是多少水平移动 - 所以正数表示向右走,负数表示向左走

Make the first number negative. the right number doesn't do anything (it's vertical change). First number is how much to move horizontally - so positive numbers mean go right, negative numbers mean go left.

这篇关于滚动horizo​​ntalScrollView左右的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆