修改mRootView实例为null时初始化错误的问题

This commit is contained in:
wangcongtao
2020-08-31 09:59:10 +08:00
parent e8269f4131
commit c43f929ac2

View File

@@ -89,7 +89,7 @@ public abstract class MvpFragment<V extends IView, P extends Presenter<V>> exten
@Nullable
protected <T extends View> T findViewById(int id) {
if (mRootView == null) {
mRootView = getView().findViewById(id);
mRootView = getView();
}
if (mRootView != null) {
return (T) mRootView.findViewById(id);