本文整理汇总了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));
}
示例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));
}
示例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");
}
}