use of io.reactivex.disposables.CompositeDisposable in project DevRing by LJYcoder.
the class RxBus method register.
/**
* 注册事件监听
*
* @param object
*/
public void register(Object object) {
if (object == null) {
throw new NullPointerException("Object to register must not be null.");
}
CompositeDisposable compositeDisposable = new CompositeDisposable();
EventComposite subscriberMethods = EventFind.findAnnotatedSubscriberMethods(object, compositeDisposable);
mEventCompositeMap.put(object, subscriberMethods);
if (!STICKY_EVENT_MAP.isEmpty()) {
// 如果有粘性事件,则发送粘性事件
subscriberMethods.subscriberSticky(STICKY_EVENT_MAP);
}
}
use of io.reactivex.disposables.CompositeDisposable in project Awesome-WanAndroid by JsonChao.
the class AbstractSimpleDialogFragment method onCreateView.
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
mRootView = inflater.inflate(getLayout(), container, false);
unBinder = ButterKnife.bind(this, mRootView);
mCompositeDisposable = new CompositeDisposable();
initEventAndData();
return mRootView;
}
use of io.reactivex.disposables.CompositeDisposable in project Awesome-WanAndroid by JsonChao.
the class AbstractSimpleFragment method onCreateView.
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(getLayout(), container, false);
unBinder = ButterKnife.bind(this, view);
mCompositeDisposable = new CompositeDisposable();
return view;
}
use of io.reactivex.disposables.CompositeDisposable in project MyApp by MatthewDevelop.
the class HomeFragment method init.
@Override
protected void init() {
super.init();
mCompositeDisposable = new CompositeDisposable();
}
use of io.reactivex.disposables.CompositeDisposable in project android-mvp-architecture by MindorksOpenSource.
the class LoginPresenterTest method setUp.
@Before
public void setUp() throws Exception {
CompositeDisposable compositeDisposable = new CompositeDisposable();
mTestScheduler = new TestScheduler();
TestSchedulerProvider testSchedulerProvider = new TestSchedulerProvider(mTestScheduler);
mLoginPresenter = new LoginPresenter<>(mMockDataManager, testSchedulerProvider, compositeDisposable);
mLoginPresenter.onAttach(mMockLoginMvpView);
}
Aggregations