public ElevatorView(AppComponent appComponent, LifecycleActivity activity, LiveData<Integer> currentFloor) { super(appComponent, activity); this.currentFloor = currentFloor; setupViews(); this.currentFloor.observe(activity, this::setCurrentFloor); floorBlinker = LiveDataRx.fromEternalPublisher(FlowableOnBackpressureDrop.interval(500, TimeUnit.MILLISECONDS)); floorBlinker.observe(activity, this::blinkRequestedFloors); }
public BaseGameView(AppComponent appComponent, LifecycleActivity activity) { this.appComponent = appComponent; appComponent.inject(this); context = activity; unbinder = ButterKnife.bind(this, activity); activity.getLifecycle().addObserver(this); }
public static RxLifecycle with(LifecycleActivity lifecycleActivity) { return new RxLifecycle(lifecycleActivity.getLifecycle()); }
@Test public void testLifecycleActivity() { testLifecycle(Robolectric.buildActivity(LifecycleActivity.class)); testBindUntilEvent(Robolectric.buildActivity(LifecycleActivity.class)); testBindToLifecycle(Robolectric.buildActivity(LifecycleActivity.class)); }
public LobbyView(AppComponent appComponent, LifecycleActivity activity) { super(appComponent, activity); }