Advertisement
Guest User

Untitled

a guest
Apr 18th, 2015
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. swipeLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_container);
  2. swipeLayout.setOnRefreshListener(this);
  3. swipeLayout.animate();
  4. swipeLayout.setColorSchemeResources(android.R.color.holo_blue_bright,
  5. android.R.color.holo_green_light,
  6. android.R.color.holo_orange_light,
  7. android.R.color.holo_red_light);
  8.  
  9. public void onRefresh() {
  10.  
  11. new Handler().postDelayed(new Runnable() {
  12. @Override
  13. public void run() {
  14. swipeLayout.setRefreshing(false);
  15. }
  16. }, 5000);
  17. }
  18.  
  19.  
  20. boolean canChildScrollUp()
  21. {
  22. return resultado.getFirstVisiblePosition()!=0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement