给listview设置一个OnScrollListener就可 ListView.OnScrollListener scrollListener = new ListView.OnScrollListener() { @Override public void onScrollStateChanged(AbsListView view, int scrollState) { switch (scrollState) { case OnScrollListener.SCROLL_STATE_IDL…
用JS操作,body元素的scrollTop var getTop = document.getElementById("get-top"); var head = document.getElementById("head"); getTop.onclick = function () { var time = setInterval(function () { document.body.scrollTop = document.body.scrollTop -…