滚动horizontalScrollView左右 [英] Scroll horizontalScrollView left-right
问题描述
,我还需要在点击左右滚动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.
这篇关于滚动horizontalScrollView左右的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!