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


Java NewTabPageLayout类代码示例

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


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

示例1: updatePeekingCardAndHeader

import org.chromium.chrome.browser.ntp.NewTabPageLayout; //导入依赖的package包/类
public void updatePeekingCardAndHeader() {
    NewTabPageLayout aboveTheFoldView = findAboveTheFoldView();
    if (aboveTheFoldView == null) return;

    SectionHeaderViewHolder header = findFirstHeader();
    if (header == null) return;

    header.updateDisplay(computeVerticalScrollOffset(), mHasSpaceForPeekingCard);

    CardViewHolder firstCard = findFirstCard();
    if (firstCard != null) updatePeekingCard(firstCard);

    // Update the space at the bottom, which needs to know about the height of the header.
    refreshBottomSpacing();
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:16,代码来源:NewTabPageRecyclerView.java

示例2: findAboveTheFoldView

import org.chromium.chrome.browser.ntp.NewTabPageLayout; //导入依赖的package包/类
/**
 * Finds the above the fold view.
 * @return The view for above the fold or null, if it is not present.
 */
public NewTabPageLayout findAboveTheFoldView() {
    int position = getNewTabPageAdapter().getAboveTheFoldPosition();
    if (position == RecyclerView.NO_POSITION) return null;

    ViewHolder viewHolder = findViewHolderForAdapterPosition(position);
    if (viewHolder == null) return null;

    View view = viewHolder.itemView;
    if (!(view instanceof NewTabPageLayout)) return null;

    return (NewTabPageLayout) view;
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:17,代码来源:NewTabPageRecyclerView.java

示例3: NewTabPageRecyclerView

import org.chromium.chrome.browser.ntp.NewTabPageLayout; //导入依赖的package包/类
public NewTabPageRecyclerView(Context context) {
    super(context);

    Resources res = getContext().getResources();
    mToolbarHeight = res.getDimensionPixelSize(R.dimen.toolbar_height_no_shadow)
            + res.getDimensionPixelSize(R.dimen.toolbar_progress_bar_height);
    mPeekingCardBounceDistance =
            res.getDimensionPixelSize(R.dimen.snippets_peeking_card_bounce_distance);
    mSearchBoxTransitionLength =
            res.getDimensionPixelSize(R.dimen.ntp_search_box_transition_length);
    mPeekingHeight = res.getDimensionPixelSize(R.dimen.snippets_padding);

    mAboveTheFoldView = (NewTabPageLayout) LayoutInflater.from(getContext())
                                .inflate(R.layout.new_tab_page_layout, this, false);
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:16,代码来源:NewTabPageRecyclerView.java

示例4: findAboveTheFoldView

import org.chromium.chrome.browser.ntp.NewTabPageLayout; //导入依赖的package包/类
/**
 * Finds the above the fold view.
 * @return The view for above the fold or null, if it is not present.
 */
private NewTabPageLayout findAboveTheFoldView() {
    int position = getNewTabPageAdapter().getAboveTheFoldPosition();
    if (position == RecyclerView.NO_POSITION) return null;

    ViewHolder viewHolder = findViewHolderForAdapterPosition(position);
    if (viewHolder == null) return null;

    View view = viewHolder.itemView;
    if (!(view instanceof NewTabPageLayout)) return null;

    return (NewTabPageLayout) view;
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:17,代码来源:NewTabPageRecyclerView.java

示例5: getAboveTheFoldView

import org.chromium.chrome.browser.ntp.NewTabPageLayout; //导入依赖的package包/类
public NewTabPageLayout getAboveTheFoldView() {
    return mAboveTheFoldView;
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:4,代码来源:NewTabPageRecyclerView.java


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