1.首先,导入相关包
compile 'com.trello.rxlifecycle2:rxlifecycle:2.0.1'
compile 'com.trello.rxlifecycle2:rxlifecycle-android:2.0.1'
compile 'com.trello.rxlifecycle2:rxlifecycle-components:2.0.1'
2.改变baseActivity baseFragmeng依赖rxActivity
3 observable.compose(bindToLifecycle())
网友评论