Java 类android.arch.lifecycle.LifecycleActivity 实例源码

项目:elevator-room    文件:ElevatorView.java   
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);
}
项目:elevator-room    文件:BaseGameView.java   
public BaseGameView(AppComponent appComponent, LifecycleActivity activity) {
    this.appComponent = appComponent;
    appComponent.inject(this);
    context = activity;
    unbinder = ButterKnife.bind(this, activity);
    activity.getLifecycle().addObserver(this);
}
项目:RxComponentLifecycle    文件:RxLifecycle.java   
public static RxLifecycle with(LifecycleActivity lifecycleActivity) {
    return new RxLifecycle(lifecycleActivity.getLifecycle());
}
项目:RxLifeCycle    文件:AndroidLifecycleActivityTest.java   
@Test
public void testLifecycleActivity() {
    testLifecycle(Robolectric.buildActivity(LifecycleActivity.class));
    testBindUntilEvent(Robolectric.buildActivity(LifecycleActivity.class));
    testBindToLifecycle(Robolectric.buildActivity(LifecycleActivity.class));
}
项目:elevator-room    文件:LobbyView.java   
public LobbyView(AppComponent appComponent, LifecycleActivity activity) {
    super(appComponent, activity);
}