android使scrollview的子对象在自动滚动的顶部

gg58donl  于 2021-07-07  发布在  Java
关注(0)|答案(0)|浏览(169)

我正在实现一个歌词视图。我想在滚动视图的顶部制作当前选定的歌词。歌词视图在处理程序的帮助下自动滚动。下面是它目前在我的应用程序中的样子。选定的歌词将滚动到下面。目前,这是我的滚动代码。有人能帮我吗?
本期视频链接

//Get the current scroll y position from scroll view.
int curY = mScrollLyricView.getScrollY();

//This is an array of line position' height
int curLinePos = mLineYPositions.get(curHighlightLine);

//A scroll is attched with scroll view for smooth animation
mScroller.startScroll(0, curY, 0, curLinePos, 1000);

//Invalidating scroll view so that it will call to scroller to fetch the latest x,y
mScrollLyricView.invalidate();

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题