當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。