Swipe Refresh code

Swipe Refresh

linear1.setOnTouchListener(new View.OnTouchListener() {@Override public boolean onTouch(View p1,MotionEvent p2) {switch(p2.getAction()) {case MotionEvent.ACTION_DOWN: d = p2.getY();break;case MotionEvent.ACTION_UP: u = p2.getY(); if(((d-u) < -50)) {_SwipeRefresh();}break;}return true;}});

This code place in onCreate event on your project

Comments

Popular posts from this blog

Desktop Mode Code