use of com.bluelinelabs.conductor.demo.ActionBarProvider in project Conductor by bluelinelabs.
the class RxLifecycle2Controller method onAttach.
@Override
protected void onAttach(@NonNull View view) {
super.onAttach(view);
Log.i(TAG, "onAttach() called");
(((ActionBarProvider) getActivity()).getSupportActionBar()).setTitle("RxLifecycle2 Demo");
Observable.interval(1, TimeUnit.SECONDS).doOnDispose(new Action() {
@Override
public void run() {
Log.i(TAG, "Disposing from onAttach()");
}
}).compose(this.<Long>bindUntilEvent(ControllerEvent.DETACH)).subscribe(new Consumer<Long>() {
@Override
public void accept(Long num) {
Log.i(TAG, "Started in onAttach(), running until onDetach(): " + num);
}
});
}
use of com.bluelinelabs.conductor.demo.ActionBarProvider in project Conductor by bluelinelabs.
the class RxLifecycleController method onAttach.
@Override
protected void onAttach(@NonNull View view) {
super.onAttach(view);
Log.i(TAG, "onAttach() called");
(((ActionBarProvider) getActivity()).getSupportActionBar()).setTitle("RxLifecycle Demo");
Observable.interval(1, TimeUnit.SECONDS).doOnUnsubscribe(new Action0() {
@Override
public void call() {
Log.i(TAG, "Unsubscribing from onAttach()");
}
}).compose(this.<Long>bindUntilEvent(ControllerEvent.DETACH)).subscribe(new Action1<Long>() {
@Override
public void call(Long num) {
Log.i(TAG, "Started in onAttach(), running until onDetach(): " + num);
}
});
}
use of com.bluelinelabs.conductor.demo.ActionBarProvider in project Conductor by bluelinelabs.
the class AutodisposeController method onAttach.
@Override
protected void onAttach(@NonNull View view) {
super.onAttach(view);
Log.i(TAG, "onAttach() called");
(((ActionBarProvider) getActivity()).getSupportActionBar()).setTitle("Autodispose Demo");
Observable.interval(1, TimeUnit.SECONDS).doOnDispose(new Action() {
@Override
public void run() {
Log.i(TAG, "Disposing from onAttach()");
}
}).to(new ObservableScoper<Long>(scopeProvider)).subscribe(new Consumer<Long>() {
@Override
public void accept(Long num) {
Log.i(TAG, "Started in onAttach(), running until onDetach(): " + num);
}
});
}
Aggregations