[英]Scaling a view with scrolling of Listview in android
I have to scale the 'top view' while scrolling the listview
. 我必须在滚动
listview
视图时缩放“顶视图”。 I want to zoom/scale-in the topview on scrolling-up the listview and scale out while scrolling down. 我想在放大列表视图时放大/放大顶视图,并在向下滚动时放大。
How can i implement such functionality? 我如何实现这种功能?
You can use list view scroll listener. 您可以使用列表视图中滚动收听。 Here i created list view to get event when list view scroll to the last item.
在这里,我创建的列表视图来获取事件时,列表视图滚动到最后一个项目。 you can use this and create your logic.
你可以使用这个创造你的逻辑。
listHome.setOnScrollListener(new OnScrollListener() {
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
// TODO Auto-generated method stub
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCount) {
// TODO Auto-generated method stub
if (firstVisibleItem + visibleItemCount == totalrecord && totalItemCount != 0) {
}
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.