首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

View 的 scrollBy跟scrollTo

2012-09-21 
View 的 scrollBy和scrollToScrollingThe framework provides basic support for views that wish to inte

View 的 scrollBy和scrollTo
Scrolling
The framework provides basic support for views that wish to internally scroll their content. This includes keeping track of the X and Y scroll offset as well as mechanisms for drawing scrollbars. See scrollBy(int, int), scrollTo(int, int), and awakenScrollBars() for more details.

scrollBy是将view的内容移动多大的距离,而scrollTo是将view的内容移动到那个点上。
http://www.javaworld.com.tw/jute/post/view?bid=26&id=273508

注意:scroll是scroll their content移动view的内容非view本身。你可以把view和view的内容分开来看,让其中一个作为参照物进行对比就可以理解了。

热点排行