Created
September 22, 2020 14:32
-
-
Save jaozinfs/3541c770dd6c4e9f1c8d12245b5696ba to your computer and use it in GitHub Desktop.
cancela e inicia um job do flow module
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
private fun startSlide() { | |
slideJob?.cancel() | |
slideJob = lifecycleScope.launchWhenCreated { | |
flipModuleFlow(pager.currentItem, movieImagesAdapter.getAdapterSize()) | |
.collect { currentPosition-> | |
pager.setCurrentItem(currentPosition, true) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment