Foggy day
Android(Kotlin) - RxKotlin -1 : PublishSubject 본문
val items: PublishSubject<Int> = PublishSubject.create()
items.onNext(1)
items.onNext(2)
items.onNext(3)
items.filter { i -> i % 2 == 0 }.subscribe(::println)
items.onNext(4)
items.onNext(5)
items.onNext(6)
items.onNext(7)
items.onNext(8)
'Android' 카테고리의 다른 글
Android(Kotlin) - RxKotlin -2 : Map, flatMap (0) | 2021.03.23 |
---|---|
Android(Kotlin) - RxKotlin -2 : Observable (0) | 2021.03.23 |
Android - getSupportFragmentManager, getChildFragmentManager (0) | 2021.03.21 |
Android(Kotlin) - question example using assets file - 2 (0) | 2021.03.14 |
Android(Kotlin) - question example using assets file - 1 (0) | 2021.03.14 |