Perform refreshing scenario
Closed this issue · 3 comments
waelsyrian996 commented
Hi,
how to perform refresh programmatically ?
Advice please .
Thanks !
imallan commented
Will add in version 2.0. Stay tuned.
imallan commented
2.0 released. closed.
waelsyrian996 commented
@allan1st
Greate Thanks !
I just used MotionEvent for this functionality and waiting the update 2.0 to update the solution 👍
private void ShowRefreshLayout() {
ViewTreeObserver vto = jellyLayout.getViewTreeObserver();
vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
if (!layoutBuilt) {
MotionEvent event = MotionEvent.obtain(50, 50, MotionEvent.ACTION_MOVE, 0, 1000, MotionEvent.ACTION_CANCEL);
jellyLayout.onTouchEvent(event);
MotionEvent event2 = MotionEvent.obtain(50, 50, MotionEvent.ACTION_CANCEL, 0, 1000, MotionEvent.ACTION_CANCEL);
jellyLayout.onTouchEvent(event2);
}
}
});
}