Java Code Examples for skin.support.SkinCompatManager#SkinLoaderStrategy

The following examples show how to use skin.support.SkinCompatManager#SkinLoaderStrategy . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SkinCompatResources.java    From Android-skin-support with MIT License 5 votes vote down vote up
public void reset(SkinCompatManager.SkinLoaderStrategy strategy) {
    mResources = SkinCompatManager.getInstance().getContext().getResources();
    mSkinPkgName = "";
    mSkinName = "";
    mStrategy = strategy;
    isDefaultSkin = true;
    SkinCompatUserThemeManager.get().clearCaches();
    for (SkinResources skinResources : mSkinResources) {
        skinResources.clear();
    }
}
 
Example 2
Source File: SkinCompatResources.java    From Android-skin-support with MIT License 5 votes vote down vote up
public void setupSkin(Resources resources, String pkgName, String skinName, SkinCompatManager.SkinLoaderStrategy strategy) {
    if (resources == null || TextUtils.isEmpty(pkgName) || TextUtils.isEmpty(skinName)) {
        reset(strategy);
        return;
    }
    mResources = resources;
    mSkinPkgName = pkgName;
    mSkinName = skinName;
    mStrategy = strategy;
    isDefaultSkin = false;
    SkinCompatUserThemeManager.get().clearCaches();
    for (SkinResources skinResources : mSkinResources) {
        skinResources.clear();
    }
}
 
Example 3
Source File: SkinCompatResources.java    From Android-skin-support with MIT License 5 votes vote down vote up
public void reset(SkinCompatManager.SkinLoaderStrategy strategy) {
    mResources = SkinCompatManager.getInstance().getContext().getResources();
    mSkinPkgName = "";
    mSkinName = "";
    mStrategy = strategy;
    isDefaultSkin = true;
    SkinCompatUserThemeManager.get().clearCaches();
    SkinCompatDrawableManager.get().clearCaches();
}
 
Example 4
Source File: SkinCompatResources.java    From Android-skin-support with MIT License 5 votes vote down vote up
public void setupSkin(Resources resources, String pkgName, String skinName, SkinCompatManager.SkinLoaderStrategy strategy) {
    if (resources == null || TextUtils.isEmpty(pkgName) || TextUtils.isEmpty(skinName)) {
        reset(strategy);
        return;
    }
    mResources = resources;
    mSkinPkgName = pkgName;
    mSkinName = skinName;
    mStrategy = strategy;
    isDefaultSkin = false;
    SkinCompatUserThemeManager.get().clearCaches();
    SkinCompatDrawableManager.get().clearCaches();
}
 
Example 5
Source File: SkinCompatResources.java    From Android-skin-support with MIT License 5 votes vote down vote up
public void setupSkin(Resources resources, String pkgName, String skinName, SkinCompatManager.SkinLoaderStrategy strategy) {
    mResources = resources;
    mSkinPkgName = pkgName;
    mSkinName = skinName;
    mStrategy = strategy;
    isDefaultSkin = TextUtils.isEmpty(skinName);
}
 
Example 6
Source File: SkinCompatResources.java    From Android-skin-support with MIT License 4 votes vote down vote up
public SkinCompatManager.SkinLoaderStrategy getStrategy() {
    return mStrategy;
}