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


Java ResourceId类代码示例

本文整理汇总了Java中org.chromium.chrome.browser.ResourceId的典型用法代码示例。如果您正苦于以下问题:Java ResourceId类的具体用法?Java ResourceId怎么用?Java ResourceId使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: addSection

import org.chromium.chrome.browser.ResourceId; //导入依赖的package包/类
private View addSection(int enumeratedIconId, String headline, String description) {
    View section = LayoutInflater.from(mContext).inflate(R.layout.connection_info,
            null);
    ImageView i = (ImageView) section.findViewById(R.id.connection_info_icon);
    int drawableId = ResourceId.mapToDrawableId(enumeratedIconId);
    i.setImageResource(drawableId);

    TextView h = (TextView) section.findViewById(R.id.connection_info_headline);
    h.setText(headline);
    if (TextUtils.isEmpty(headline)) h.setVisibility(View.GONE);

    TextView d = (TextView) section.findViewById(R.id.connection_info_description);
    d.setText(description);
    d.setTextSize(DESCRIPTION_TEXT_SIZE_SP);
    if (TextUtils.isEmpty(description)) d.setVisibility(View.GONE);

    mContainer.addView(section);
    return section;
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:20,代码来源:ConnectionInfoPopup.java

示例2: CardUnmaskBridge

import org.chromium.chrome.browser.ResourceId; //导入依赖的package包/类
public CardUnmaskBridge(long nativeCardUnmaskPromptViewAndroid, String title,
        String instructions, String confirmButtonLabel, int iconId,
        boolean shouldRequestExpirationDate, boolean canStoreLocally,
        boolean defaultToStoringLocally, long successMessageDurationMilliseconds,
        WindowAndroid windowAndroid) {
    mNativeCardUnmaskPromptViewAndroid = nativeCardUnmaskPromptViewAndroid;
    Activity activity = windowAndroid.getActivity().get();
    if (activity == null) {
        mCardUnmaskPrompt = null;
        // Clean up the native counterpart.  This is posted to allow the native counterpart
        // to fully finish the construction of this glue object before we attempt to delete it.
        new Handler().post(new Runnable() {
            @Override
            public void run() {
                dismissed();
            }
        });
    } else {
        mCardUnmaskPrompt = new CardUnmaskPrompt(activity, this, title, instructions,
                confirmButtonLabel, ResourceId.mapToDrawableId(iconId),
                shouldRequestExpirationDate, canStoreLocally, defaultToStoringLocally,
                successMessageDurationMilliseconds);
    }
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:25,代码来源:CardUnmaskBridge.java

示例3: createContent

import org.chromium.chrome.browser.ResourceId; //导入依赖的package包/类
@Override
public void createContent(InfoBarLayout layout) {
    InfoBarControlLayout control = layout.addControlLayout();

    if (mPermissionIcons.length == 1) {
        control.addIcon(ResourceId.mapToDrawableId(mPermissionIcons[0]),
                R.color.light_normal_color, mPermissionText[0], null);
    } else {
        for (int i = 0; i < mPermissionIcons.length; i++) {
            control.addSwitch(ResourceId.mapToDrawableId(mPermissionIcons[i]),
                    R.color.light_normal_color, mPermissionText[i], i, true);
        }
    }

    // Call this last to ensure that if a persistence toggle is added, it's added last.
    super.createContent(layout);
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:18,代码来源:GroupedPermissionInfoBar.java

示例4: CardUnmaskBridge

import org.chromium.chrome.browser.ResourceId; //导入依赖的package包/类
public CardUnmaskBridge(long nativeCardUnmaskPromptViewAndroid, String title,
        String instructions, int iconId, boolean shouldRequestExpirationDate,
        boolean canStoreLocally, boolean defaultToStoringLocally, WindowAndroid windowAndroid) {
    mNativeCardUnmaskPromptViewAndroid = nativeCardUnmaskPromptViewAndroid;
    Activity activity = windowAndroid.getActivity().get();
    if (activity == null) {
        mCardUnmaskPrompt = null;
        // Clean up the native counterpart.  This is posted to allow the native counterpart
        // to fully finish the construction of this glue object before we attempt to delete it.
        new Handler().post(new Runnable() {
            @Override
            public void run() {
                dismissed();
            }
        });
    } else {
        mCardUnmaskPrompt = new CardUnmaskPrompt(activity, this, title, instructions,
                ResourceId.mapToDrawableId(iconId), shouldRequestExpirationDate,
                canStoreLocally, defaultToStoringLocally);
    }
}
 
开发者ID:Smalinuxer,项目名称:Vafrinn,代码行数:22,代码来源:CardUnmaskBridge.java

示例5: PermissionDialogDelegate

import org.chromium.chrome.browser.ResourceId; //导入依赖的package包/类
/**
 * Upon construction, this class takes ownership of the passed in native delegate.
 */
private PermissionDialogDelegate(long nativeDelegatePtr, Tab tab, int[] contentSettingsTypes,
        int enumeratedIconId, String message, String linkText, String primaryButtonText,
        String secondaryButtonText, boolean showPersistenceToggle) {
    mNativeDelegatePtr = nativeDelegatePtr;
    mTab = tab;
    mContentSettingsTypes = contentSettingsTypes;
    mDrawableId = ResourceId.mapToDrawableId(enumeratedIconId);
    mMessageText = message;
    mLinkText = linkText;
    mPrimaryButtonText = primaryButtonText;
    mSecondaryButtonText = secondaryButtonText;
    mShowPersistenceToggle = showPersistenceToggle;
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:17,代码来源:PermissionDialogDelegate.java

示例6: create

import org.chromium.chrome.browser.ResourceId; //导入依赖的package包/类
@CalledByNative("CreditCard")
public static CreditCard create(String guid, String origin, boolean isLocal,
        boolean isCached, String name, String number, String obfuscatedNumber, String month,
        String year, String basicCardPaymentType, int enumeratedIconId,
        String billingAddressId, String serverId) {
    return new CreditCard(guid, origin, isLocal, isCached, name, number, obfuscatedNumber,
            month, year, basicCardPaymentType, ResourceId.mapToDrawableId(enumeratedIconId),
            billingAddressId, serverId);
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:10,代码来源:PersonalDataManager.java

示例7: show

import org.chromium.chrome.browser.ResourceId; //导入依赖的package包/类
@CalledByNative
private static InfoBar show(int enumeratedIconId, String messageText, int inlineLinkRangeStart,
        int inlineLinkRangeEnd) {
    int drawableId = ResourceId.mapToDrawableId(enumeratedIconId);
    return new SearchGeolocationDisclosureInfoBar(
            drawableId, messageText, inlineLinkRangeStart, inlineLinkRangeEnd);
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:8,代码来源:SearchGeolocationDisclosureInfoBar.java

示例8: showDataReductionProxyInfoBar

import org.chromium.chrome.browser.ResourceId; //导入依赖的package包/类
/**
 * Creates and begins the process for showing a DataReductionProxyInfoBarDelegate.
 * @param enumeratedIconId ID corresponding to the icon that will be shown for the InfoBar.
 *                         The ID must have been mapped using the ResourceMapper class before
 *                         passing it to this function.
 */
@CalledByNative
InfoBar showDataReductionProxyInfoBar(int enumeratedIconId) {
    int drawableId = ResourceId.mapToDrawableId(enumeratedIconId);
    DataReductionProxyInfoBar infoBar = new DataReductionProxyInfoBar(drawableId);
    return infoBar;
}
 
开发者ID:Smalinuxer,项目名称:Vafrinn,代码行数:13,代码来源:DataReductionProxyInfoBarDelegate.java

示例9: create

import org.chromium.chrome.browser.ResourceId; //导入依赖的package包/类
@CalledByNative("CreditCard")
public static CreditCard create(String guid, String origin, boolean isLocal,
        boolean isCached, String name, String number, String obfuscatedNumber, String month,
        String year, String basicCardIssuerNetwork, int enumeratedIconId,
        String billingAddressId, String serverId) {
    return new CreditCard(guid, origin, isLocal, isCached, name, number, obfuscatedNumber,
            month, year, basicCardIssuerNetwork,
            ResourceId.mapToDrawableId(enumeratedIconId), billingAddressId, serverId);
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:10,代码来源:PersonalDataManager.java

示例10: show

import org.chromium.chrome.browser.ResourceId; //导入依赖的package包/类
@CalledByNative
private static InfoBar show(int enumeratedIconId, String message, String oKButtonText,
        String reloadButtonText, String toggleText, String followUpMessage) {
    return new SubresourceFilterExperimentalInfoBar(
            ResourceId.mapToDrawableId(enumeratedIconId), message, oKButtonText,
            reloadButtonText, toggleText, followUpMessage);
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:8,代码来源:SubresourceFilterExperimentalInfoBar.java

示例11: showConfirmInfoBar

import org.chromium.chrome.browser.ResourceId; //导入依赖的package包/类
/**
 * Creates and begins the process for showing a ConfirmInfoBar.
 * @param nativeInfoBar Pointer to the C++ InfoBar corresponding to the Java InfoBar.
 * @param enumeratedIconId ID corresponding to the icon that will be shown for the InfoBar.
 *                         The ID must have been mapped using the ResourceMapper class before
 *                         passing it to this function.
 * @param message Message to display to the user indicating what the InfoBar is for.
 * @param linkText Link text to display in addition to the message.
 * @param buttonOk String to display on the OK button.
 * @param buttonCancel String to display on the Cancel button.
 */
@CalledByNative
InfoBar showConfirmInfoBar(int nativeInfoBar, int enumeratedIconId, String message,
        String linkText, String buttonOk, String buttonCancel) {
    int drawableId = ResourceId.mapToDrawableId(enumeratedIconId);

    // Apparently, yellow was the popular choice at the time these InfoBars were implemented
    // because they stuck out more (hence the BACKGROUND_TYPE_WARNING) default.
    ConfirmInfoBar infoBar = new ConfirmInfoBar(nativeInfoBar, null,
            InfoBar.BACKGROUND_TYPE_WARNING, drawableId, message, linkText, buttonOk,
            buttonCancel);
    return infoBar;
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:24,代码来源:ConfirmInfoBarDelegate.java

示例12: show

import org.chromium.chrome.browser.ResourceId; //导入依赖的package包/类
@CalledByNative
private static InfoBar show(int enumeratedIconId, String[] usernames, String message,
        int titleLinkStart, int titleLinkEnd, String primaryButtonText) {
    return new UpdatePasswordInfoBar(ResourceId.mapToDrawableId(enumeratedIconId), usernames,
            message, titleLinkStart, titleLinkEnd, primaryButtonText);
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:7,代码来源:UpdatePasswordInfoBar.java

示例13: show

import org.chromium.chrome.browser.ResourceId; //导入依赖的package包/类
@CalledByNative
private static InfoBar show(int enumeratedIconId, String message, String primaryButtonText,
        String secondaryButtonText, String explanationMessage) {
    return new SubresourceFilterInfoBar(ResourceId.mapToDrawableId(enumeratedIconId), message,
            primaryButtonText, secondaryButtonText, explanationMessage);
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:7,代码来源:SubresourceFilterInfoBar.java

示例14: show

import org.chromium.chrome.browser.ResourceId; //导入依赖的package包/类
@CalledByNative
private static InfoBar show(int enumeratedIconId, String message, int titleLinkStart,
        int titleLinkEnd, String primaryButtonText, String secondaryButtonText) {
    return new SavePasswordInfoBar(ResourceId.mapToDrawableId(enumeratedIconId), message,
            titleLinkStart, titleLinkEnd, primaryButtonText, secondaryButtonText);
}
 
开发者ID:Smalinuxer,项目名称:Vafrinn,代码行数:7,代码来源:SavePasswordInfoBar.java

示例15: show

import org.chromium.chrome.browser.ResourceId; //导入依赖的package包/类
@CalledByNative
private static InfoBar show(
        int enumeratedIconId, String message, String linkText, String timestampText) {
    return new PreviewsInfoBar(
            ResourceId.mapToDrawableId(enumeratedIconId), message, linkText, timestampText);
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:7,代码来源:PreviewsInfoBar.java


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