We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mvp工程下的build.gradle文件中的android模块下增加
buildFeatures { dataBinding = true }
XActivity的更改如下:
增加泛型:public abstract class XActivity<P extends IPresent, DataBinding extends ViewDataBinding> extends RxAppCompatActivity implements IView<P>{}
定义变量:protected DataBinding mDataBinding;
修改布局的设置onCreate方法中:mDataBinding = DataBindingUtil.setContentView(this, getLayoutId()); bindUI(mDataBinding.getRoot());
XFragment的更改如下:
增加泛型:public abstract class XFragment<P extends IPresent, DataBinding extends ViewDataBinding> extends RxFragment implements IView<P> {}
修改布局的设置onCreateView方法中:mViewDataBinding = DataBindingUtil.inflate(inflater, getLayoutId(), container, false); rootView = mViewDataBinding.getRoot(); bindUI(rootView);
LazyFragment的更改如下:
增加泛型:public class LazyFragment<DataBinding extends ViewDataBinding> extends RxFragment{}
修改布局的设置setContentView中:(if分支)mViewDataBinding = DataBindingUtil.inflate(getLayoutInflater(), layoutResID, container, false); View view = mViewDataBinding.getRoot();
(else分支)mViewDataBinding = DataBindingUtil.inflate(getLayoutInflater(), layoutResID, container, false); rootView = mViewDataBinding.getRoot();
XLazyFragment的更改如下:
增加泛型:public abstract class XLazyFragment<P extends IPresent, DataBinding extends ViewDataBinding> extends LazyFragment<DataBinding> implements IView<P> { 以上都是个人拙见,有需要的可以替换使用
增加泛型:public abstract class XLazyFragment<P extends IPresent, DataBinding extends ViewDataBinding> extends LazyFragment<DataBinding> implements IView<P> {
The text was updated successfully, but these errors were encountered:
No branches or pull requests
mvp工程下的build.gradle文件中的android模块下增加
buildFeatures { dataBinding = true }
XActivity的更改如下:
增加泛型:public abstract class XActivity<P extends IPresent, DataBinding extends ViewDataBinding> extends RxAppCompatActivity implements IView<P>{}
定义变量:protected DataBinding mDataBinding;
修改布局的设置onCreate方法中:mDataBinding = DataBindingUtil.setContentView(this, getLayoutId()); bindUI(mDataBinding.getRoot());
XFragment的更改如下:
增加泛型:public abstract class XFragment<P extends IPresent, DataBinding extends ViewDataBinding> extends RxFragment implements IView<P> {}
定义变量:protected DataBinding mDataBinding;
修改布局的设置onCreateView方法中:mViewDataBinding = DataBindingUtil.inflate(inflater, getLayoutId(), container, false); rootView = mViewDataBinding.getRoot(); bindUI(rootView);
LazyFragment的更改如下:
增加泛型:public class LazyFragment<DataBinding extends ViewDataBinding> extends RxFragment{}
定义变量:protected DataBinding mDataBinding;
修改布局的设置setContentView中:(if分支)mViewDataBinding = DataBindingUtil.inflate(getLayoutInflater(), layoutResID, container, false); View view = mViewDataBinding.getRoot();
(else分支)mViewDataBinding = DataBindingUtil.inflate(getLayoutInflater(), layoutResID, container, false); rootView = mViewDataBinding.getRoot();
XLazyFragment的更改如下:
增加泛型:public abstract class XLazyFragment<P extends IPresent, DataBinding extends ViewDataBinding> extends LazyFragment<DataBinding> implements IView<P> {
以上都是个人拙见,有需要的可以替换使用
The text was updated successfully, but these errors were encountered: