Created
August 11, 2019 08:04
-
-
Save drawers/e61d2dae3a160381e3c24bdaead50e35 to your computer and use it in GitHub Desktop.
A humble Fragment with a recyclerview
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 PickupFragment : Fragment() { | |
private val disposables = CompositeDisposable() | |
private lateinit var adapter: RecylerView.Adapter<PickupVH> | |
override fun onStart() { | |
super.onStart() | |
source().viewStates() | |
.observeOn(AndroidSchedulers.mainThread()) | |
.subscribe { data: PickupData -> | |
adapter.setData(data) | |
} | |
.addTo(disposables) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment