From bc37906083a9ed16f4fd9114fdfe7571ec96adbf Mon Sep 17 00:00:00 2001 From: Yarix Date: Tue, 15 Apr 2014 23:53:43 +0300 Subject: [PATCH] rxjava-android: parameterize OperatorViewClick by concrete view type --- .../main/java/rx/android/observables/ViewObservable.java | 2 +- .../src/main/java/rx/operators/OperatorViewClick.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rxjava-contrib/rxjava-android/src/main/java/rx/android/observables/ViewObservable.java b/rxjava-contrib/rxjava-android/src/main/java/rx/android/observables/ViewObservable.java index 205f25c944..ecf0ab4f21 100644 --- a/rxjava-contrib/rxjava-android/src/main/java/rx/android/observables/ViewObservable.java +++ b/rxjava-contrib/rxjava-android/src/main/java/rx/android/observables/ViewObservable.java @@ -26,7 +26,7 @@ public class ViewObservable { - public static Observable clicks(final View view, final boolean emitInitialValue) { + public static Observable clicks(final T view, final boolean emitInitialValue) { return Observable.create(new OperatorViewClick(view, emitInitialValue)); } diff --git a/rxjava-contrib/rxjava-android/src/main/java/rx/operators/OperatorViewClick.java b/rxjava-contrib/rxjava-android/src/main/java/rx/operators/OperatorViewClick.java index 7ee7149b72..fb4f06625e 100644 --- a/rxjava-contrib/rxjava-android/src/main/java/rx/operators/OperatorViewClick.java +++ b/rxjava-contrib/rxjava-android/src/main/java/rx/operators/OperatorViewClick.java @@ -28,17 +28,17 @@ import rx.functions.Action0; import android.view.View; -public final class OperatorViewClick implements Observable.OnSubscribe { +public final class OperatorViewClick implements Observable.OnSubscribe { private final boolean emitInitialValue; - private final View view; + private final T view; - public OperatorViewClick(final View view, final boolean emitInitialValue) { + public OperatorViewClick(final T view, final boolean emitInitialValue) { this.emitInitialValue = emitInitialValue; this.view = view; } @Override - public void call(final Subscriber observer) { + public void call(final Subscriber observer) { Assertions.assertUiThread(); final CompositeOnClickListener composite = CachedListeners.getFromViewOrCreate(view);