How to move Horizontal Scroll View to a particular position?

帅比萌擦擦* 提交于 2020-01-03 17:49:05

问题


I am using scrollView without any listView or gridview .I have just added same views to it but know I want to programmatically scroll to a particular position. Is this possible ?

Please help I am using Horizontal Scroll?


回答1:


you can use this method

horizontalScrollView.scrollBy(160, 0);

or

horizontalScrollView.scrollTo(160, 0);


来源:https://stackoverflow.com/questions/11700581/how-to-move-horizontal-scroll-view-to-a-particular-position

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!