Created
February 27, 2017 13:01
-
-
Save sys1yagi/8236098d77627745e01adc06d4c554c2 to your computer and use it in GitHub Desktop.
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
withBeforeAfter( | |
before = { | |
binding.recyclerView.isLayoutFrozen = true | |
}, | |
after = { | |
binding.recyclerView.isLayoutFrozen = false | |
}, | |
block = { | |
// complex processing | |
} | |
) |
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
inline fun withBeforeAfter( | |
before: () -> Unit, | |
after: () -> Unit, | |
block: () -> Unit | |
) { | |
before() | |
block() | |
after() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment