Skip to content
the library is a loop RecyclerView(expression), can show some effects when display
Branch: master
Clone or download
kHRYSTAL fix notifydatasetchange display error
(cherry picked from commit 10eeb5d)
Latest commit f22353d Nov 19, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app rename CircularHorizontalBTTMode Aug 16, 2017
gradle/wrapper fix #3 scrollToPosition notwork, use delay when first onLayout Oct 20, 2016
library fix notifydatasetchange display error Nov 18, 2017
screenshot add CircularHorizontalMode Oct 24, 2016
.gitignore first commit Sep 14, 2016
README.md add CircularHorizontalMode Oct 24, 2016
build.gradle
gradle.properties first commit Sep 14, 2016
gradlew first commit Sep 14, 2016
gradlew.bat first commit Sep 14, 2016
settings.gradle add circlerv and some mode Sep 14, 2016

README.md

CircleRecyclerView

the library is a loop RecyclerView, can show some effects when display

screenshot

CircularViewMode

CircularViewMode

ScaleXViewMode & ScaleYViewMode

ScaleXYViewMode

RotateXScaleYViewMode & RotateYScaleXViewMode

RotateXYScaleXYViewMode

NoLoop but CenterForce (setClipPadding(l,t,r,b); setClipChildren(false);)

CircularHorizontalMode

CircularHorizontalMode

usage


mCircleRecyclerView = (CircleRecyclerView) view.findViewById(R.id.circle_rv);
mCircleRecyclerView.setLayoutManager(mLayoutManager);
mCircleRecyclerView.setViewMode(mItemViewMode); // T implements ItemViewMode, after setLayoutManager(manager)
mCircleRecyclerView.setNeedCenterForce(true); // when SCROLL_STATE_IDLE == state, nearly center itemview scroll to center

mCircleRecyclerView.setNeedLoop(true); // default is true

// if setCenterForce(true), can set this callback
mCircleRecyclerView.setOnCenterItemClickListener(new CircleRecyclerView.OnCenterItemClickListener() {
    @Override
    public void onCenterItemClick(View v) {
        Toast.makeText(getContext(), "Center Clicked", Toast.LENGTH_SHORT).show();
    }
});

and if loop is true, the RecyclerView.Adapter need like this:

@Override
public void onBindViewHolder(VH holder, int position) {
    positionData = mDataList.get(position % mDataList.size());
}

@Override
public int getItemCount() {
    return Integer.MAX_VALUE;
}
 
You can’t perform that action at this time.