I implemented SwipeRefreshLayout in my app. I need to change the height which has to be scrolled down to call onRefresh() method. Which method should I use to add a custom height ?
Implementation of SwipeRefreshLayout
private SwipeRefreshLayout swipeLayout;
In oncreate
swipeLayout = (SwipeRefreshLayout)view.findViewById(R.id.swipe_container);
swipeLayout.setOnRefreshListener(this);
swipeLayout.setColorScheme(android.R.color.holo_blue_dark,
android.R.color.holo_green_dark,
android.R.color.holo_purple,
android.R.color.holo_orange_dark);
swipeLayout.setSoundEffectsEnabled(true);
Implementing an AsyncTask in onrefresh method
@Override
public void onRefresh()
{
// Asynctask to perform some task
}
The reversion 21 of v4 support library has provided a API to set the distance.
public void setDistanceToTriggerSync (int distance)
Check the document here.
One more thing, the rev. 21 changed the behaviour of progress bar, it's now a circle image. Have no idea how to get the old way back.