Google has recently published an update to its support library, which now has a new \"SwipeRefreshLayout\" view.
The view allows to wrap anothe
You can by simply following below method (I am using swipelayout on Expandable list ) Test.xml
ListHeader.xml
ChildItem.xml
colors used
#8ec549
#c1f57f
#f7ffed
#d6d4d4
Mainactivity.java
swipeView = (SwipeRefreshLayout) findViewById(R.id.swipe2);
swipeView.setColorSchemeResources(R.color.pDarkGreen, R.color.Gray, R.color.Yellow, R.color.pFullLightGreen);
swipeView.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
swipeView.setRefreshing(false);
}
(new Handler()).postDelayed(new Runnable() {
@Override
public void run() {
Log.d("Swipe", "Refreshing Number");
}
}, 0);
}
});
You can set swipeView.setRefreshing(false); to false or true according to your requirment
this swipeing mechanisam will work in android's all API level