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


Java XposedHelpers.setAdditionalInstanceField方法代码示例

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


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

示例1: getResourceIcon

import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
private Object getResourceIcon() {
    if (sResourceIconClass == null || icon == null)
        return null;

    try {
        Object resourceIcon = XposedHelpers.callStaticMethod(
                sResourceIconClass, "get", icon.hashCode());
        XposedHelpers.setAdditionalInstanceField(resourceIcon, TILE_KEY_NAME, mKey);
        if (DEBUG) log("getting resource icon for " + mKey);
        return resourceIcon;
    } catch (Throwable t) {
        log("Error creating resource icon:");
        XposedBridge.log(t);
        return null;
    }
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:17,代码来源:QsTile.java

示例2: prepareNotificationRow

import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
private static void prepareNotificationRow(Resources res) {
    try {
        XposedHelpers.callMethod(mVolumePanel, "addRow",
                AudioManager.STREAM_NOTIFICATION,
                mIconNotifResId, mIconNotifMuteResId, true);
        List<?> rows = (List<?>) XposedHelpers.getObjectField(mVolumePanel, "mRows");
        Object row = rows.get(rows.size() - 1);
        XposedHelpers.setAdditionalInstanceField(row, "gbNotifSlider", true);
    } catch (Throwable t) {
        XposedBridge.log(t);
    }
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:13,代码来源:ModVolumePanel.java

示例3: onCreateTileView

import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
@Override
public void onCreateTileView(View tileView) throws Throwable {
    XposedHelpers.setAdditionalInstanceField(tileView, TILE_KEY_NAME, mKey);

    mScalingFactor = QsPanel.getScalingFactor(Integer.valueOf(mPrefs.getString(
            GravityBoxSettings.PREF_KEY_QUICK_SETTINGS_TILES_PER_ROW, "0")),
            mPrefs.getInt(GravityBoxSettings.PREF_KEY_QS_SCALE_CORRECTION, 0));
    if (mScalingFactor != 1f) {
        int iconSizePx = XposedHelpers.getIntField(tileView, "mIconSizePx");
        XposedHelpers.setIntField(tileView, "mIconSizePx", Math.round(iconSizePx*mScalingFactor));
        int tileSpacingPx = XposedHelpers.getIntField(tileView, "mTileSpacingPx");
        XposedHelpers.setIntField(tileView, "mTileSpacingPx", Math.round(tileSpacingPx*mScalingFactor));
        int tilePaddingBelowIconPx = XposedHelpers.getIntField(tileView, "mTilePaddingBelowIconPx");
        XposedHelpers.setIntField(tileView, "mTilePaddingBelowIconPx",
                Math.round(tilePaddingBelowIconPx*mScalingFactor));
        int dualTileVerticalPaddingPx = XposedHelpers.getIntField(tileView, "mDualTileVerticalPaddingPx");
        XposedHelpers.setIntField(tileView, "mDualTileVerticalPaddingPx", 
                Math.round(dualTileVerticalPaddingPx*mScalingFactor));

        updateLabelLayout(tileView);
        updatePaddingTop(tileView);

        if (tileView.getClass().getName().equals(CLASS_SIGNAL_TILE_VIEW) &&
                Utils.isMotoXtDevice()) {
            updateMotoXtSignalIconLayout(tileView);
        }
    }
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:29,代码来源:BaseTile.java

示例4: QsTile

import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
protected QsTile(Object host, String key, XSharedPreferences prefs,
        QsTileEventDistributor eventDistributor) throws Throwable {
    super(host, key, prefs, eventDistributor);

    mState = new State(mKey);

    mTile = createTileObject();
    XposedHelpers.setAdditionalInstanceField(mTile, TILE_KEY_NAME, mKey);

    if (sResourceIconClass == null) {
        sResourceIconClass = getResourceIconClass(mContext.getClassLoader());
    }
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:14,代码来源:QsTile.java

示例5: AospTile

import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
protected AospTile(Object host, String key, Object tile, XSharedPreferences prefs,
                   QsTileEventDistributor eventDistributor) throws Throwable {
    super(host, key, prefs, eventDistributor);

    mTile = tile;
    XposedHelpers.setAdditionalInstanceField(tile, BaseTile.TILE_KEY_NAME, mKey);

    createHooks();
    if (DEBUG) log(mKey + ": aosp tile wrapper created");
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:11,代码来源:AospTile.java


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