Guest User

Untitled

a guest
Jan 21st, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. <android.support.v7.widget.RecyclerView
  2. xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:tools="http://schemas.android.com/tools"
  4. xmlns:app="http://schemas.android.com/apk/res-auto"
  5. android:layoutAnimation="@anim/layout_animation_slide_in_right"
  6. android:layout_width="match_parent"
  7. android:layout_height="match_parent"
  8. android:id="@+id/main_rv"
  9. />
  10.  
  11. <layoutAnimation
  12. xmlns:android="http://schemas.android.com/apk/res/android"
  13. android:animation="@anim/slide_in_right"
  14. android:delay="15%"
  15. android:animationOrder="normal"
  16. />
  17.  
  18. <set xmlns:android="http://schemas.android.com/apk/res/android"
  19. android:shareInterpolator="false" >
  20. <translate android:duration="500" android:fromXDelta="-100%" android:toXDelta="0%" />
  21. <alpha android:duration="500" android:fromAlpha="0.0" android:toAlpha="1.0" />
  22. </set>
  23.  
  24. public void onRefresh()
  25. {
  26. displayRefresher.setRefreshing(true);
  27.  
  28. loadUpTests(lastId);
  29. runLayoutAnimation();
  30.  
  31. displayRefresher.setRefreshing(false);
  32. }
  33.  
  34. private void runLayoutAnimation()
  35. {
  36. testsDisplay.getAdapter().notifyDataSetChanged();
  37. testsDisplay.scheduleLayoutAnimation();
  38. }
Add Comment
Please, Sign In to add comment