0

enter image description here

I have to scale the 'top view' while scrolling the 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?

Asha Soman
  • 1,821
  • 1
  • 15
  • 27
  • possible duplicate of [ListView get scroll position?](http://stackoverflow.com/questions/10865150/listview-get-scroll-position) – ntv1000 Jul 08 '14 at 10:26
  • I want the logic for scaling the top view with respect to scrolling of listview. – Asha Soman Jul 08 '14 at 10:30

1 Answers1

0

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) {

                }

    });
nishitpatel
  • 642
  • 4
  • 9
  • 25
  • I want the logic for scaling the top view with respect to scrolling of listview. – Asha Soman Jul 08 '14 at 10:31
  • You have top view and now you have list view scrolling event so now you need to scale top view in scrolling event. If you only want to scroll you top view than avoid if condition in listener. – nishitpatel Jul 08 '14 at 10:42