还原了多进程小地图方案,原因是LayoutInflater.from(this).cloneInContext(this)没有起到作用

This commit is contained in:
董宏宇
2020-12-24 17:20:01 +08:00
parent 7653f28a54
commit 6c32317421
6 changed files with 161 additions and 44 deletions

View File

@@ -3,6 +3,7 @@ package com.mogo.commons;
import android.app.Application;
import android.content.Context;
import android.text.TextUtils;
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -59,7 +60,7 @@ public abstract class AbsMogoApplication extends Application {
public void onCreate() {
super.onCreate();
// 在设置皮肤布局填充器之前进行克隆一个出来
mLayoutInflaterNoSkin = LayoutInflater.from(this).cloneInContext(this);
mLayoutInflaterNoSkin = LayoutInflater.from(new ContextThemeWrapper(this, R.style.Theme_AppCompat)).cloneInContext(new ContextThemeWrapper(this, R.style.Theme_AppCompat));
sApp = this;
initARouter();
if ( shouldInit() ) {