当前位置: 首页>>代码示例>>Java>>正文


Java XResources.setSystemWideReplacement方法代码示例

本文整理汇总了Java中android.content.res.XResources.setSystemWideReplacement方法的典型用法代码示例。如果您正苦于以下问题:Java XResources.setSystemWideReplacement方法的具体用法?Java XResources.setSystemWideReplacement怎么用?Java XResources.setSystemWideReplacement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.content.res.XResources的用法示例。


在下文中一共展示了XResources.setSystemWideReplacement方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initZygote

import android.content.res.XResources; //导入方法依赖的package包/类
@Override
public void initZygote(IXposedHookZygoteInit.StartupParam startupParam) throws Throwable {
    XposedBridge.log("CleanLockscreen initZygote");

    if(android.os.Build.VERSION.SDK_INT<=20)
        packageName = "com.android.keyguard";
    else
        packageName = "com.android.systemui";

    MODULE_PATH = startupParam.modulePath;
    if(MODULE_PATH == null){
        XposedBridge.log("CleanLockscreen modulePath is null!");
    }
    prefs = new XSharedPreferences(CleanLockscreen.class.getPackage().getName());

    // Remove emergency call text
    if (prefs.getBoolean("remove_emergency", false)) {
        XResources.setSystemWideReplacement("android:string/lockscreen_emergency_call", "");
    }

    XposedBridge.log("CleanLockscreen initZygote complete");
}
 
开发者ID:indecisivemal,项目名称:CleanLockscreen,代码行数:23,代码来源:CleanLockscreen.java

示例2: initZygote

import android.content.res.XResources; //导入方法依赖的package包/类
@InitZygote(summary = "自動輝度調整")
public static void initZygote(StartupParam startupParam,
        ModBrightnessSettingsGen mBrightnessSettings) throws Throwable {
    // 自動輝度調整
    if (StringUtils.isNotEmpty(mBrightnessSettings.configAutoBrightnessLevels)
            && StringUtils
                    .isNotEmpty(mBrightnessSettings.configAutoBrightnessLcdBacklightValues)) {
        int[] autoBrightnessLevels = makeIntArray(mBrightnessSettings.configAutoBrightnessLevels);
        int[] autoBrightnessLcdBacklightValues = makeIntArray(mBrightnessSettings.configAutoBrightnessLcdBacklightValues);
        if ((autoBrightnessLevels.length + 1) != autoBrightnessLcdBacklightValues.length) {
            throw new IllegalArgumentException("パラメータ数エラー");
        }
        XResources.setSystemWideReplacement("android", "array",
                "config_autoBrightnessLevels",
                autoBrightnessLevels);
        XResources.setSystemWideReplacement("android", "array",
                "config_autoBrightnessLcdBacklightValues",
                autoBrightnessLcdBacklightValues);

        XResources.setSystemWideReplacement("android", "bool",
                "config_automatic_brightness_available", true);
    }
}
 
开发者ID:75py,项目名称:XUtilities,代码行数:24,代码来源:ModBrightness.java

示例3: replaceRecoveryMessage

import android.content.res.XResources; //导入方法依赖的package包/类
private static void replaceRecoveryMessage() {
    try {
        Resources res = XResources.getSystem();
        XResources.setSystemWideReplacement(
                res.getIdentifier("reboot_to_reset_title", "string", "android"),
                mRecoveryStr);
    } catch (Throwable t) { /* ignore */ }
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:9,代码来源:ModPowerMenu.java

示例4: initZygote

import android.content.res.XResources; //导入方法依赖的package包/类
@Override
    public void initZygote(IXposedHookZygoteInit.StartupParam startupParam) throws Throwable {

        loadPrefs();
/*
        // Tried changing dark theme as white, didn't work
        XResources.setSystemWideReplacement("android", "color", "primary_text_default_material_dark", Color.parseColor("#de000000"));
        XResources.setSystemWideReplacement("android", "color", "secondary_text_default_material_dark", Color.parseColor("#8a000000"));
*/
        if(DISABLE_EUI) {
            XResources.setSystemWideReplacement("android", "dimen", "status_bar_icon_size", new XResources.DimensionReplacement(20, TypedValue.COMPLEX_UNIT_DIP));
        }

    }
 
开发者ID:aruncodes,项目名称:eui_moder,代码行数:15,代码来源:MainClass.java

示例5: replaceSystemWideThemes

import android.content.res.XResources; //导入方法依赖的package包/类
private void replaceSystemWideThemes() {
        Logger.v("Replacing system-wide Theme resources.");
        Logger.logTheme(mSettings);

        XResources.setSystemWideReplacement("android", "color", "material_blue_grey_900",
                mSettings.getPrimaryColor());
        XResources.setSystemWideReplacement("android", "color", "primary_material_dark",
                mSettings.getPrimaryColor());
//        XResources.setSystemWideReplacement("android", "color", "primary_material_light",
//                Common.enlightColor(mSettings.getPrimaryColor(), 2.25f));
        XResources.setSystemWideReplacement("android", "color", "material_blue_grey_950",
                mSettings.getPrimaryDarkColor());
        XResources.setSystemWideReplacement("android", "color", "primary_dark_material_dark",
                mSettings.getPrimaryDarkColor());
//        XResources.setSystemWideReplacement("android", "color", "primary_dark_material_light",
//                Common.enlightColor(mSettings.getPrimaryColor(), 1.65f));
        XResources.setSystemWideReplacement("android", "color", "material_deep_teal_500",
                mSettings.getAccentColor());
        XResources.setSystemWideReplacement("android", "color", "accent_material_dark",
                mSettings.getAccentColor());
        XResources.setSystemWideReplacement("android", "color", "accent_material_light",
                mSettings.getAccentColor());
        XResources.setSystemWideReplacement("android", "color", "material_deep_teal_200",
                Common.enlightColor(mSettings.getAccentColor(), 1.5f));

        Logger.v("Theme resources replaced.");
    }
 
开发者ID:woalk,项目名称:HTCAuthorizer,代码行数:28,代码来源:X_Mod.java

示例6: initZygote

import android.content.res.XResources; //导入方法依赖的package包/类
@Override
public void initZygote(StartupParam startupParam) throws Throwable {
	prefs = new XSharedPreferences(LollipopPowerMenu.class.getPackage()
			.getName());
	prefs.makeWorldReadable();
	ArrayList<String> itemsList = new ArrayList<String>();
	if (isEnabled(GLOBAL_ACTION_KEY_POWER, true)) {
		itemsList.add(GLOBAL_ACTION_KEY_POWER);
	}
	if (isEnabled(GLOBAL_ACTION_KEY_AIRPLANE, false)) {
		itemsList.add(GLOBAL_ACTION_KEY_AIRPLANE);
	}
	if (isEnabled(GLOBAL_ACTION_KEY_SILENT, false)) {
		itemsList.add(GLOBAL_ACTION_KEY_SILENT);
	}
	if (isEnabled(GLOBAL_ACTION_KEY_USERS, false)) {
		itemsList.add(GLOBAL_ACTION_KEY_USERS);
	}
	if (isEnabled(GLOBAL_ACTION_KEY_SETTINGS, false)) {
		itemsList.add(GLOBAL_ACTION_KEY_SETTINGS);
	}
	if (isEnabled(GLOBAL_ACTION_KEY_LOCKDOWN, false)) {
		itemsList.add(GLOBAL_ACTION_KEY_LOCKDOWN);
	}
	String[] powerMenuItems = itemsList
			.toArray(new String[itemsList.size()]);
	XResources.setSystemWideReplacement("android", "array",
			"config_globalActionsList", powerMenuItems);
}
 
开发者ID:pylerSM,项目名称:LollipopPowerMenu,代码行数:30,代码来源:LollipopPowerMenu.java

示例7: initZygote

import android.content.res.XResources; //导入方法依赖的package包/类
@Override
public void initZygote(IXposedHookZygoteInit.StartupParam param) throws Throwable
{
  SystemUIResources.initFlags();
  
  MODULE_PATH = param.modulePath;
  prefs = new XSharedPreferences(XposedMain.class.getPackage().getName());
  prefs.makeWorldReadable();

  if(JELLYBEAN && prefs.getBoolean("key_hide_shortcuts", false))
  {
    XResources.setSystemWideReplacement("android", "drawable", "ic_lockscreen_camera_hint", 0);
    XResources.setSystemWideReplacement("android", "drawable", "ic_lockscreen_other_widgets_hint", 0);
  }
}
 
开发者ID:greg2001,项目名称:GemXperiaXposed,代码行数:16,代码来源:XposedMain.java

示例8: minBrightness

import android.content.res.XResources; //导入方法依赖的package包/类
@InitZygote(summary = "最低輝度")
public static void minBrightness(StartupParam startupParam,
        ModBrightnessSettingsGen mBrightnessSettings) throws Throwable {
    XResources.setSystemWideReplacement("android", "integer", "config_screenBrightnessDim",
            mBrightnessSettings.minBrightness);
    if (VersionUtil.isJBmr1OrLater()) {
        XResources.setSystemWideReplacement("android", "integer",
                "config_screenBrightnessSettingMinimum", mBrightnessSettings.minBrightness);
    }
}
 
开发者ID:75py,项目名称:XUtilities,代码行数:11,代码来源:ModBrightness.java

示例9: setConfigAllowActionMenuItemTextWithIcon

import android.content.res.XResources; //导入方法依赖的package包/类
@InitZygote(summary = "ActionMenuのテキスト表示")
public static void setConfigAllowActionMenuItemTextWithIcon(StartupParam startupParam,
        ModOtherUtilitiesSettingsGen mOtherUtilitiesSettings) throws Throwable {
    XResources.setSystemWideReplacement("android", "bool",
            "config_allowActionMenuItemTextWithIcon",
            mOtherUtilitiesSettings.configAllowActionMenuItemTextWithIcon);
}
 
开发者ID:75py,项目名称:XUtilities,代码行数:8,代码来源:ModOtherUtilities.java

示例10: setConfigCameraSoundForced

import android.content.res.XResources; //导入方法依赖的package包/类
@InitZygote(summary = "カメラ シャッター音")
@XMinSdkVersion(Build.VERSION_CODES.JELLY_BEAN_MR1)
public static void setConfigCameraSoundForced(StartupParam startupParam,
        ModOtherUtilitiesSettingsGen mOtherUtilitiesSettings) throws Throwable {
    XResources.setSystemWideReplacement("android", "bool", "config_camera_sound_forced",
            mOtherUtilitiesSettings.configCameraSoundForced);
}
 
开发者ID:75py,项目名称:XUtilities,代码行数:8,代码来源:ModOtherUtilities.java

示例11: initResources

import android.content.res.XResources; //导入方法依赖的package包/类
public static void initResources(final XSharedPreferences prefs) {
    try {
        Resources systemRes = XResources.getSystem();

        int translucentDecor = Integer.valueOf(prefs.getString(GravityBoxSettings.PREF_KEY_TRANSLUCENT_DECOR, "0"));
        if (translucentDecor != 0) {
            XResources.setSystemWideReplacement("android", "bool", "config_enableTranslucentDecor", translucentDecor == 1);
        }

        if (prefs.getBoolean(GravityBoxSettings.PREF_KEY_NAVBAR_OVERRIDE, false)) {
            XResources.setSystemWideReplacement("android", "bool", "config_showNavigationBar",
                    prefs.getBoolean(GravityBoxSettings.PREF_KEY_NAVBAR_ENABLE,
                            SystemPropertyProvider.getSystemConfigBool(systemRes,
                                    "config_showNavigationBar")));
        }

        XResources.setSystemWideReplacement("android", "bool", "config_unplugTurnsOnScreen",
                prefs.getBoolean(GravityBoxSettings.PREF_KEY_UNPLUG_TURNS_ON_SCREEN,
                        SystemPropertyProvider.getSystemConfigBool(systemRes,
                                "config_unplugTurnsOnScreen")));

        if (!Utils.isVerneeApolloDevice()) {
            int pulseNotificationDelay = prefs.getInt(GravityBoxSettings.PREF_KEY_PULSE_NOTIFICATION_DELAY, -1);
            if (pulseNotificationDelay != -1) {
                XResources.setSystemWideReplacement("android", "integer", "config_defaultNotificationLedOff",
                        (pulseNotificationDelay));;
            }
        }

        XResources.setSystemWideReplacement("android", "bool", "config_sip_wifi_only", false);

        if (prefs.getBoolean(GravityBoxSettings.PREF_KEY_BRIGHTNESS_MASTER_SWITCH, false)) {
            int brightnessMin = prefs.getInt(GravityBoxSettings.PREF_KEY_BRIGHTNESS_MIN, 20);
            XResources.setSystemWideReplacement(
                "android", "integer", "config_screenBrightnessSettingMinimum", brightnessMin);
            if (DEBUG) log("Minimum brightness value set to: " + brightnessMin);

            int screenDim = prefs.getInt(GravityBoxSettings.PREF_KEY_SCREEN_DIM_LEVEL, 10);
            XResources.setSystemWideReplacement(
                    "android", "integer", "config_screenBrightnessDim", screenDim);
            if (DEBUG) log("Screen dim level set to: " + screenDim);
        }

        // Safe media volume
        Utils.TriState triState = Utils.TriState.valueOf(prefs.getString(
                GravityBoxSettings.PREF_KEY_SAFE_MEDIA_VOLUME, "DEFAULT"));
        if (DEBUG) log(GravityBoxSettings.PREF_KEY_SAFE_MEDIA_VOLUME + ": " + triState);
        if (triState != Utils.TriState.DEFAULT) {
            XResources.setSystemWideReplacement("android", "bool", "config_safe_media_volume_enabled",
                    triState == Utils.TriState.ENABLED);
            if (DEBUG) log("config_safe_media_volume_enabled: " + (triState == Utils.TriState.ENABLED));
        }
    } catch (Throwable t) {
        XposedBridge.log(t);
    }
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:57,代码来源:SystemWideResources.java

示例12: initZygote

import android.content.res.XResources; //导入方法依赖的package包/类
@Override
public void initZygote(IXposedHookZygoteInit.StartupParam startupParam) throws Throwable {
    XResources.setSystemWideReplacement("android", "bool", "config_enableAutoPowerModes", true);
}
 
开发者ID:theblixguy,项目名称:ForceDoze,代码行数:5,代码来源:XposedModule.java

示例13: setShowOngoingImeSwitcher

import android.content.res.XResources; //导入方法依赖的package包/类
@InitZygote(summary = "IME通知表示有無")
public static void setShowOngoingImeSwitcher(StartupParam startupParam,
        ModOtherUtilitiesSettingsGen mOtherUtilitiesSettings) throws Throwable {
    XResources.setSystemWideReplacement("android", "bool", "show_ongoing_ime_switcher",
            mOtherUtilitiesSettings.showOngoingImeSwitcher);
}
 
开发者ID:75py,项目名称:XUtilities,代码行数:7,代码来源:ModOtherUtilities.java


注:本文中的android.content.res.XResources.setSystemWideReplacement方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。