Last active
September 25, 2019 22:27
-
-
Save Laimiux/d857ad8239111da7f5b8c63fe611d695 to your computer and use it in GitHub Desktop.
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
class StopwatchActivity : FragmentActivity() { | |
private val disposables = CompositeDisposable() | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.stopwatch_activity) | |
val renderView = StopwatchRenderView(findViewById(R.id.activity_content)) | |
val renderModels: Observable<StopwatchRenderModel> = | |
StopwatchFormula().start(Unit) | |
disposables.add(renderModels.subscribe(renderView.renderer::render)) | |
} | |
override fun onDestroy() { | |
disposables.clear() | |
super.onDestroy() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment