Closed benwicks closed 6 years ago
They're different imports. Do you have both the view.visibility and widget.visibility functions imported?
On Fri, Mar 2, 2018 at 11:00 AM Benjamin Wicks notifications@github.com wrote:
I'm trying to use this visibility extension function but it looks like it conflicts with View#getVisibility.
Here's my usage:
viewModel.loading() .map { loading -> !loading } .observeOn(AndroidSchedulers.mainThread()) .subscribe(actionButton.visibility())
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JakeWharton/RxBinding/issues/435, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEEEcj4NH4o1M4HO6zCHUBeRgxZNsfcks5taWyxgaJpZM4SaG27 .
Otherwise you can use RxFloatingActionButton.visibility(actionButton) as a workaround.
On Fri, Mar 2, 2018 at 11:09 AM Jake Wharton jakewharton@gmail.com wrote:
They're different imports. Do you have both the view.visibility and widget.visibility functions imported?
On Fri, Mar 2, 2018 at 11:00 AM Benjamin Wicks notifications@github.com wrote:
I'm trying to use this visibility extension function but it looks like it conflicts with View#getVisibility.
Here's my usage:
viewModel.loading() .map { loading -> !loading } .observeOn(AndroidSchedulers.mainThread()) .subscribe(actionButton.visibility())
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JakeWharton/RxBinding/issues/435, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEEEcj4NH4o1M4HO6zCHUBeRgxZNsfcks5taWyxgaJpZM4SaG27 .
Ok I found out how to import it correctly now. Thanks!
import com.jakewharton.rxbinding2.support.design.widget.visibility
I just had to Ctrl-Space and import the one I wanted.
https://github.com/JakeWharton/RxBinding/blob/41fa0a79827fa4b93a0daf9a3406f524b34c1052/rxbinding-design-kotlin/src/main/kotlin/com/jakewharton/rxbinding2/support/design/widget/RxFloatingActionButton.kt#L17
I'm trying to use this
visibility
extension function but it looks like it conflicts withView#getVisibility
.Here's my usage: