I'm new to using RxJava and still getting familiar with a lot of concept in it. Trying to use it in a project and what I want to do is subscribe a click event of a view to change the visibility of another view. Here is my trial that works.
RxView.clicks(info_overlay).map { _ -> View.GONE }.subscribe {
AppCache().hasSeenInfoScreen = true
info_overlay_child_take_a_helfie.visibility = it
info_overlay_child_subscription.visibility = it
info_overlay_child_description.visibility = it
info_overlay_child_header.visibility = it
}
However, I also want to subscribe to visibility of info_overlay
. So that the visibility of info_overlay
affects other views as well.
How do i achieve this and the click observable together.