Skip to content

Instantly share code, notes, and snippets.

@husaynhakeem
Created April 11, 2022 00:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save husaynhakeem/34172ecaf1415e6aca473965efb6fe5e to your computer and use it in GitHub Desktop.
Save husaynhakeem/34172ecaf1415e6aca473965efb6fe5e to your computer and use it in GitHub Desktop.
class ListActivity : AppCompatActivity() {
private val splitListener = Consumer<List<SplitInfo>> { splitInfoList ->
// React to a split change
}
override fun onStart() {
super.onStart()
SplitController
.getInstance()
.addSplitListener(this, mainExecutor, splitListener)
}
override fun onStop() {
super.onStop()
SplitController
.getInstance()
.removeSplitListener(fabSplitListener)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment