[6.7.2]
1、修复换肤SDK 在Fragment没有生效的问题,原因是使用的LayoutInflater不是hook后的需要替换为LayoutInflater.from(getContext())
This commit is contained in:
@@ -28,7 +28,7 @@ public abstract class BaseFragment extends Fragment {
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
if (mRootView == null) {
|
||||
mRootView = inflater.inflate(getLayoutId(), container, false);
|
||||
mRootView = LayoutInflater.from(getContext()).inflate(getLayoutId(), container, false);
|
||||
} else {
|
||||
ViewGroup viewGroup = (ViewGroup) mRootView.getParent();
|
||||
if (viewGroup != null) {
|
||||
|
||||
@@ -33,7 +33,7 @@ public abstract class MvpDialogFragment< V extends IView, P extends Presenter< V
|
||||
@Override
|
||||
public View onCreateView( @NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState ) {
|
||||
if ( mRootView == null ) {
|
||||
mRootView = inflater.inflate( getLayoutId(), container, false );
|
||||
mRootView = LayoutInflater.from(getContext()).inflate( getLayoutId(), container, false );
|
||||
} else {
|
||||
ViewGroup viewGroup = ( ViewGroup ) mRootView.getParent();
|
||||
if ( viewGroup != null )
|
||||
|
||||
Reference in New Issue
Block a user