本文整理汇总了Java中org.chromium.chrome.browser.ResourceId类的典型用法代码示例。如果您正苦于以下问题:Java ResourceId类的具体用法?Java ResourceId怎么用?Java ResourceId使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ResourceId类属于org.chromium.chrome.browser包,在下文中一共展示了ResourceId类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: 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
示例17: 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 First line of the suggestion.
* @param sublabel Second line of the suggestion.
* @param iconId The resource ID for the icon associated with the suggestion, or 0 for no icon.
* @param suggestionId Identifier for the suggestion type.
* @param deletable Whether this item is deletable.
* @param isLabelMultiline Whether the label should be should over multiple lines.
*/
@CalledByNative
private static void addToAutofillSuggestionArray(AutofillSuggestion[] array, int index,
String label, String sublabel, int iconId, int suggestionId, boolean deletable,
boolean isLabelMultiline) {
int drawableId = iconId == 0 ? DropdownItem.NO_ICON : ResourceId.mapToDrawableId(iconId);
array[index] = new AutofillSuggestion(
label, sublabel, drawableId, suggestionId, deletable, isLabelMultiline);
}
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:19,代码来源:AutofillPopupBridge.java
示例18: show
import org.chromium.chrome.browser.ResourceId; //导入依赖的package包/类
/**
* Creates and shows the infobar to notify that the generated password was saved.
* @param enumeratedIconId Enum ID corresponding to the icon that the infobar will show.
* @param messageText Message to display in the infobar.
* @param inlineLinkRangeStart The start of the range of the messageText that should be a link.
* @param inlineLinkRangeEnd The end of the range of the messageText that should be a link.
* @param buttonLabel String to display on the button.
*/
@CalledByNative
private static InfoBar show(int enumeratedIconId, String messageText, int inlineLinkRangeStart,
int inlineLinkRangeEnd, String buttonLabel) {
return new GeneratedPasswordSavedInfoBar(ResourceId.mapToDrawableId(enumeratedIconId),
messageText, inlineLinkRangeStart, inlineLinkRangeEnd, buttonLabel);
}
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:15,代码来源:GeneratedPasswordSavedInfoBarDelegate.java
示例19: AutofillCreditCardFillingInfoBar
import org.chromium.chrome.browser.ResourceId; //导入依赖的package包/类
/**
* Creates a new instance of the infobar.
*
* @param nativeAutofillCreditCardFillingInfoBar The pointer to the native object for callbacks.
* @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 iconBitmap Bitmap to use if there is no equivalent Java resource for enumeratedIconId.
* @param message Message to display to the user indicating what the InfoBar is for.
* @param buttonOk String to display on the OK button.
* @param buttonCancel String to display on the Cancel button.
*/
private AutofillCreditCardFillingInfoBar(long nativeAutofillCreditCardFillingInfoBar,
int enumeratedIconId, Bitmap iconBitmap, String message, String buttonOk,
String buttonCancel) {
super(ResourceId.mapToDrawableId(enumeratedIconId), iconBitmap, message, null, buttonOk,
buttonCancel);
}
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:19,代码来源:AutofillCreditCardFillingInfoBar.java
示例20: create
import org.chromium.chrome.browser.ResourceId; //导入依赖的package包/类
/**
* Creates and begins the process for showing a ConfirmInfoBar.
* @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 iconBitmap Bitmap to use if there is no equivalent Java resource for
* enumeratedIconId.
* @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
private static ConfirmInfoBar create(int enumeratedIconId, Bitmap iconBitmap, String message,
String linkText, String buttonOk, String buttonCancel) {
int drawableId = ResourceId.mapToDrawableId(enumeratedIconId);
ConfirmInfoBar infoBar = new ConfirmInfoBar(drawableId, iconBitmap, message, linkText,
buttonOk, buttonCancel);
return infoBar;
}
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:23,代码来源:ConfirmInfoBar.java
注:本文中的org.chromium.chrome.browser.ResourceId类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论