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


Java RecyclerViewOverScrollDecorAdapter类代码示例

本文整理汇总了Java中me.everything.android.ui.overscroll.adapters.RecyclerViewOverScrollDecorAdapter的典型用法代码示例。如果您正苦于以下问题:Java RecyclerViewOverScrollDecorAdapter类的具体用法?Java RecyclerViewOverScrollDecorAdapter怎么用?Java RecyclerViewOverScrollDecorAdapter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: initialize

import me.everything.android.ui.overscroll.adapters.RecyclerViewOverScrollDecorAdapter; //导入依赖的package包/类
private void initialize(Context context) {
    if (isInEditMode()) {
        return;
    }
    setLayoutManager(new LinearLayoutManager(context));
    mAdapter = new CommentAdapter(new ArrayList<Comment>());
    setAdapter(mAdapter);
    setItemAnimator(new CommentAnimator());
    addItemDecoration(new CardItemDecoration(8));

    new VerticalOverScrollBounceEffectDecorator(new RecyclerViewOverScrollDecorAdapter(this));
}
 
开发者ID:wiiiky,项目名称:letscorp,代码行数:13,代码来源:CommentListView.java

示例2: initialize

import me.everything.android.ui.overscroll.adapters.RecyclerViewOverScrollDecorAdapter; //导入依赖的package包/类
private void initialize(Context context) {
    setLayoutManager(new LinearLayoutManager(context));
    new VerticalOverScrollBounceEffectDecorator(new RecyclerViewOverScrollDecorAdapter(this));
}
 
开发者ID:wiiiky,项目名称:letscorp,代码行数:5,代码来源:PostView.java

示例3: setUpOverScroll

import me.everything.android.ui.overscroll.adapters.RecyclerViewOverScrollDecorAdapter; //导入依赖的package包/类
/**
 * Set up the over-scroll effect over a specified {@link RecyclerView} view.
 * <br/>Only recycler-views using <b>native</b> Android layout managers (i.e. {@link LinearLayoutManager},
 * {@link GridLayoutManager} and {@link StaggeredGridLayoutManager}) are currently supported
 * by this convenience method.
 *
 * @param recyclerView The view.
 * @param orientation Either {@link #ORIENTATION_HORIZONTAL} or {@link #ORIENTATION_VERTICAL}.
 *
 * @return The over-scroll effect 'decorator', enabling further effect configuration.
 */
public static IOverScrollDecor setUpOverScroll(RecyclerView recyclerView, int orientation) {
    switch (orientation) {
        case ORIENTATION_HORIZONTAL:
            return new HorizontalOverScrollBounceEffectDecorator(new RecyclerViewOverScrollDecorAdapter(recyclerView));
        case ORIENTATION_VERTICAL:
            return new VerticalOverScrollBounceEffectDecorator(new RecyclerViewOverScrollDecorAdapter(recyclerView));
        default:
            throw new IllegalArgumentException("orientation");
    }
}
 
开发者ID:EverythingMe,项目名称:overscroll-decor,代码行数:22,代码来源:OverScrollDecoratorHelper.java


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