修改皮肤库noop实现问题

This commit is contained in:
tongchenfei
2020-09-09 20:15:02 +08:00
parent 0eb83394f3
commit 69c9f83a1c
4 changed files with 6 additions and 5 deletions

View File

@@ -95,6 +95,7 @@ public abstract class MvpActivity< V extends IView, P extends Presenter< V > >
@NonNull
@Override
public AppCompatDelegate getDelegate() {
return MogoSkinManager.getInstance().getInstaller().getSkinAppCompatDelegate( this, this );
return MogoSkinManager.getInstance().getInstaller().getSkinAppCompatDelegate(this,
super.getDelegate(), this);
}
}

View File

@@ -60,7 +60,7 @@ class SkinSupportInstaller implements IMogoSkinSupportInstaller {
}
@Override
public AppCompatDelegate getSkinAppCompatDelegate( AppCompatActivity activity, AppCompatCallback callback ) {
public AppCompatDelegate getSkinAppCompatDelegate( AppCompatActivity activity,AppCompatDelegate superDelegate, AppCompatCallback callback ) {
return SkinAppCompatDelegateImpl.get( activity, callback );
}

View File

@@ -36,8 +36,8 @@ class SkinSupportInstaller implements IMogoSkinSupportInstaller {
}
@Override
public AppCompatDelegate getSkinAppCompatDelegate( AppCompatActivity activity, AppCompatCallback callback ) {
return activity.getDelegate();
public AppCompatDelegate getSkinAppCompatDelegate( AppCompatActivity activity,AppCompatDelegate superDelegate, AppCompatCallback callback ) {
return superDelegate;
}
@Override

View File

@@ -21,5 +21,5 @@ interface IMogoSkinSupportInstaller extends IProvider {
void loadSkin( SkinMode skinMode );
AppCompatDelegate getSkinAppCompatDelegate( AppCompatActivity activity, AppCompatCallback callback );
AppCompatDelegate getSkinAppCompatDelegate( AppCompatActivity activity,AppCompatDelegate superDelegate, AppCompatCallback callback );
}