I have a long ScrollView
in my layout.
What I want, is that when the user scrolls to the bottom of the Layout(not physical Screen), an ImageView
to appear in the bottom of the layout so I can click on it.
How can i create this?
Thanks.
Asked
Active
Viewed 310 times
-1

androidboy
- 15
- 1
- 7
1 Answers
0
here I have some code I use to load a large scrollview page by page. When you scroll to the last items of list, the scroll listener fires a http call to get the next page.
lv_wall.setOnScrollListener(new OnScrollListener()
{
@Override
public void onScrollStateChanged(AbsListView view, int scrollState)
{
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount)
{
if (first)
{
first = false;
}
else
{
boolean lastItem = firstVisibleItem + visibleItemCount == totalItemCount && lv_wall.getChildAt(visibleItemCount - 1) != null
&& lv_wall.getChildAt(visibleItemCount - 1).getBottom() <= lv_wall.getHeight();
if (!blocked && lastItem && more_pages)
{
++page;
getWall();
}
}
}
});
Instead of ++page
and getWall()
you can make your ImageView
appear.

Tofasio
- 425
- 3
- 14
-
I do not have a list. I have a just long ScrollView with many elements on it. I want when user Scroll to down of layout, an imageview appear. – androidboy May 13 '15 at 08:34
-
Iook at this post: http://stackoverflow.com/questions/10713312/can-i-have-onscrolllistener-for-a-scrollview – Tofasio May 13 '15 at 08:36