Created
October 18, 2019 16:14
-
-
Save alana-mullen/51488622a5fb398cbe4712c848657b2b to your computer and use it in GitHub Desktop.
SwipeRefreshLayout Kotlin extensions
This file contains 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
package uk.co.thewirelessguy.thewirelessguy.extensions | |
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout | |
fun SwipeRefreshLayout?.start() { | |
this?.apply { | |
isRefreshing = true | |
isEnabled = false | |
} | |
} | |
fun SwipeRefreshLayout?.stop() { | |
this?.apply { | |
isRefreshing = false | |
isEnabled = true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment