當前位置: 首頁>>代碼示例>>Java>>正文


Java SuggestionsCategoryInfo類代碼示例

本文整理匯總了Java中org.chromium.chrome.browser.ntp.cards.SuggestionsCategoryInfo的典型用法代碼示例。如果您正苦於以下問題:Java SuggestionsCategoryInfo類的具體用法?Java SuggestionsCategoryInfo怎麽用?Java SuggestionsCategoryInfo使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SuggestionsCategoryInfo類屬於org.chromium.chrome.browser.ntp.cards包,在下文中一共展示了SuggestionsCategoryInfo類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createSuggestionsCategoryInfo

import org.chromium.chrome.browser.ntp.cards.SuggestionsCategoryInfo; //導入依賴的package包/類
@CalledByNative
private static SuggestionsCategoryInfo createSuggestionsCategoryInfo(int category, String title,
        int cardLayout, boolean hasMoreAction, boolean hasReloadAction,
        boolean hasViewAllAction, boolean showIfEmpty, String noSuggestionsMessage) {
    return new SuggestionsCategoryInfo(category, title, cardLayout, hasMoreAction,
            hasReloadAction, hasViewAllAction, showIfEmpty, noSuggestionsMessage);
}
 
開發者ID:rkshuai,項目名稱:chromium-for-android-56-debug-video,代碼行數:8,代碼來源:SnippetsBridge.java

示例2: createSuggestionsCategoryInfo

import org.chromium.chrome.browser.ntp.cards.SuggestionsCategoryInfo; //導入依賴的package包/類
@CalledByNative
private static SuggestionsCategoryInfo createSuggestionsCategoryInfo(int category, String title,
        @ContentSuggestionsCardLayout int cardLayout,
        @ContentSuggestionsAdditionalAction int additionalAction, boolean showIfEmpty,
        String noSuggestionsMessage) {
    return new SuggestionsCategoryInfo(
            category, title, cardLayout, additionalAction, showIfEmpty, noSuggestionsMessage);
}
 
開發者ID:mogoweb,項目名稱:365browser,代碼行數:9,代碼來源:SnippetsBridge.java

示例3: setInfoForCategory

import org.chromium.chrome.browser.ntp.cards.SuggestionsCategoryInfo; //導入依賴的package包/類
/**
 * Sets the metadata to be returned for a given category.
 */
public void setInfoForCategory(@CategoryInt int category, SuggestionsCategoryInfo info) {
    mCategoryInfo.put(category, info);
}
 
開發者ID:rkshuai,項目名稱:chromium-for-android-56-debug-video,代碼行數:7,代碼來源:FakeSuggestionsSource.java

示例4: getCategoryInfo

import org.chromium.chrome.browser.ntp.cards.SuggestionsCategoryInfo; //導入依賴的package包/類
@Override
public SuggestionsCategoryInfo getCategoryInfo(int category) {
    return mCategoryInfo.get(category);
}
 
開發者ID:rkshuai,項目名稱:chromium-for-android-56-debug-video,代碼行數:5,代碼來源:FakeSuggestionsSource.java

示例5: getCategoryInfo

import org.chromium.chrome.browser.ntp.cards.SuggestionsCategoryInfo; //導入依賴的package包/類
@Override
public SuggestionsCategoryInfo getCategoryInfo(int category) {
    assert mNativeSnippetsBridge != 0;
    return nativeGetCategoryInfo(mNativeSnippetsBridge, category);
}
 
開發者ID:rkshuai,項目名稱:chromium-for-android-56-debug-video,代碼行數:6,代碼來源:SnippetsBridge.java

示例6: nativeGetCategoryInfo

import org.chromium.chrome.browser.ntp.cards.SuggestionsCategoryInfo; //導入依賴的package包/類
private native SuggestionsCategoryInfo nativeGetCategoryInfo(
long nativeNTPSnippetsBridge, int category);
 
開發者ID:rkshuai,項目名稱:chromium-for-android-56-debug-video,代碼行數:3,代碼來源:SnippetsBridge.java

示例7: onBindViewHolder

import org.chromium.chrome.browser.ntp.cards.SuggestionsCategoryInfo; //導入依賴的package包/類
/**
 * Updates ViewHolder with data.
 * @param article The snippet to take the data from.
 * @param categoryInfo The info of the category which the snippet belongs to.
 */
public void onBindViewHolder(
        final SnippetArticle article, SuggestionsCategoryInfo categoryInfo) {
    super.onBindViewHolder();

    mArticle = article;
    mCategoryInfo = categoryInfo;
    updateLayout();

    mHeadlineTextView.setText(mArticle.mTitle);

    // The favicon of the publisher should match the TextView height.
    int widthSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
    int heightSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
    mPublisherTextView.measure(widthSpec, heightSpec);
    mPublisherFaviconSizePx = mPublisherTextView.getMeasuredHeight();

    mArticleSnippetTextView.setText(mArticle.mPreviewText);
    mPublisherTextView.setText(getPublisherString(mArticle));
    mArticleAgeTextView.setText(getArticleAge(mArticle));
    setThumbnail();

    // Set the favicon of the publisher.
    // We start initialising with the default favicon to reserve the space and prevent the text
    // from moving later.
    setDefaultFaviconOnView();
    try {
        long faviconFetchStartTimeMs = SystemClock.elapsedRealtime();
        URI pageUrl = new URI(mArticle.mUrl);
        if (!article.isArticle() || !SnippetsConfig.isFaviconsFromNewServerEnabled()) {
            // The old code path. Remove when the experiment is successful.
            // Currently, we have to use this for non-articles, due to privacy.
            fetchFaviconFromLocalCache(pageUrl, true, faviconFetchStartTimeMs);
        } else {
            // The new code path.
            fetchFaviconFromLocalCacheOrGoogleServer(faviconFetchStartTimeMs);
        }
    } catch (URISyntaxException e) {
        // Do nothing, stick to the default favicon.
    }

    mOfflineBadge.setVisibility(View.GONE);
    refreshOfflineBadgeVisibility();
}
 
開發者ID:mogoweb,項目名稱:365browser,代碼行數:49,代碼來源:SnippetArticleViewHolder.java

示例8: getCategoryInfo

import org.chromium.chrome.browser.ntp.cards.SuggestionsCategoryInfo; //導入依賴的package包/類
/**
 * Gets the meta information of a category.
 */
SuggestionsCategoryInfo getCategoryInfo(int category);
 
開發者ID:rkshuai,項目名稱:chromium-for-android-56-debug-video,代碼行數:5,代碼來源:SuggestionsSource.java


注:本文中的org.chromium.chrome.browser.ntp.cards.SuggestionsCategoryInfo類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。