Last active
May 13, 2018 19:56
-
-
Save vorobeij/545d4a52ec91bfcd25a43aa98d7ca3da to your computer and use it in GitHub Desktop.
swipe to refresh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <android.support.v4.widget.SwipeRefreshLayout | |
| android:id="@+id/rssSwipeRefreshContainer" | |
| android:layout_width="0dp" | |
| android:layout_height="0dp" | |
| app:layout_constraintBottom_toBottomOf="parent" | |
| app:layout_constraintEnd_toEndOf="parent" | |
| app:layout_constraintStart_toStartOf="parent" | |
| app:layout_constraintTop_toTopOf="parent"> | |
| // layouts to refresh | |
| </android.support.v4.widget.SwipeRefreshLayout> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class XView { | |
| onCreate(){ | |
| swipeRefreshContainer.setOnRefreshListener { webView.reload() } | |
| } | |
| // somewhere when updated data received | |
| swipeRefreshContainer.isRefreshing = false | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment