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


Java ResourceId.mapToDrawableId方法代码示例

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


在下文中一共展示了ResourceId.mapToDrawableId方法的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: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: 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

示例13: 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

示例14: 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

示例15: addToAutofillSuggestionArray

import org.chromium.chrome.browser.ResourceId; //导入方法依赖的package包/类
/**
 * @param array AutofillSuggestion array that should get a new suggestion added.
 * @param index Index in the array where to place a new suggestion.
 * @param label Suggested text. The text that's going to be filled in the focused field, with a
 *              few exceptions:
 *              <ul>
 *                  <li>Credit card numbers are elided, e.g. "Visa ****-1234."</li>
 *                  <li>The text "CLEAR FORM" will clear the filled in text.</li>
 *                  <li>Empty text can be used to display only icons, e.g. for credit card scan
 *                      or editing autofill settings.</li>
 *              </ul>
 * @param sublabel Hint for the suggested text. The text that's going to be filled in the
 *                 unfocused fields of the form. If {@see label} is empty, then this must be
 *                 empty too.
 * @param iconId The resource ID for the icon associated with the suggestion, or 0 for no icon.
 * @param suggestionId Identifier for the suggestion type.
 */
@CalledByNative
private static void addToAutofillSuggestionArray(AutofillSuggestion[] array, int index,
        String label, String sublabel, int iconId, int suggestionId, boolean deletable) {
    int drawableId = iconId == 0 ? DropdownItem.NO_ICON : ResourceId.mapToDrawableId(iconId);
    array[index] =
            new AutofillSuggestion(label, sublabel, drawableId, suggestionId, deletable, false);
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:25,代码来源:AutofillKeyboardAccessoryBridge.java


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