1.ScrollView monitoring whether scrolling to the top or bottom
Onscrollchanged ();
Scroll to Top judge: getscrolly () = = 0
Scroll to the bottom to judge: getchildat (0 .getmeasuredheight ( Span class= "Crayon-o" ><= getscrolly ( Span class= "Crayon-sy" >) + getheight ()
< Span class= "crayon-h" > < Span class= "CRAYON-E" > when getscrolly () When the maximum is reached, the height of the scrollview is equal to the height of its content
< Span class= "crayon-h" > < Span class= "CRAYON-E" >2.listview, GridView (ablistview) Scroll to the last listener
< Span class= "crayon-h" > < Span class= "CRAYON-E" >onscrollstatechanged ();
< Span class= "crayon-h" > < Span class= "CRAYON-E" >if (scrollstate == Onscrolllistener.scroll_state_idle)//sliding events run out at the end of the last item.
< Span class= "crayon-h" > < Span class= "CRAYON-E" >abslistview.getlastvisibleposition () = = ( Abslistview.getcount ()-1)
< Span class= "crayon-h" > < Span class= "CRAYON-E" >3. Drop-down Refresh listener
< Span class= "crayon-h" > < Span class= "CRAYON-E" >ontouchevent ();
< Span class= "crayon-h" > < Span class= "CRAYON-E" >movey-downy>defaultdistance: Slide down to the default distance (default distance >0, otherwise (pull back)
Then update pading
Androidのui Experience pull Down