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

Overview

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;
}
 
Comments
  • CircularViewRTLMode get selected value

    CircularViewRTLMode get selected value

    Please let us know how i can get selected value and scoll list on click to next item and code below of CircularViewRTLMode.

    @Override public void applyToView(View v, RecyclerView parent) { float halfHeight = v.getHeight() * 0.5f; float parentHalfHeight = parent.getHeight() * 0.5f; float y = v.getY(); float rot = parentHalfHeight - halfHeight - y; Log.e("paent", "applyToView:>>"+parent.getChildAdapterPosition(v) ); ViewCompat.setPivotX(v, v.getWidth()); ViewCompat.setPivotY(v, halfHeight); ViewCompat.setRotation(v, -1 * rot * 0.05f); ViewCompat.setTranslationX(v, -1 * (float) (-Math.cos(rot * mTranslationRatio * mDegToRad) + 1) * mCircleOffset);

        float scale = 1.0f - Math.abs(parentHalfHeight - halfHeight - y) * mScalingRatio;
        ViewCompat.setScaleX(v, scale);
        ViewCompat.setScaleY(v, scale);
    }
    
    opened by gagan50 20
  • Cardview not set in center

    Cardview not set in center

    I have used this. Its demo works fine. When i add card view as items in CircleRecyclerView, its work fine without this line circleRecyclerView.setNeedCenterForce(true);

    But i want center card view item event in my project. So i add circleRecyclerView.setNeedCenterForce(true); then its shows error java.lang.NullPointerException: Attempt to invoke virtual method 'float android.view.View.getX()' on a null object reference

    I do lots of debug on this. then I find getChildCount() in CircleRecyclerView return null. How to resolve this?

    opened by vishaljadav24 4
  • Item view in not horizontal center

    Item view in not horizontal center

    In item_h.xml ,if android:layout_width="80dp" change to android:layout_width="100dp", Then The item view is not horizontal center

    opened by twolight 4
  • Contineous Scrolling

    Contineous Scrolling

    Hello @kHRYSTAL thanks for this library I am use in my project some of customization i have done but is there any changes to auto scrolling smoothing i have tried but its scrolling step by step not smoothing and RV method smooth scroll not working as per name

    opened by milaptank 4
  • Need all images in same height

    Need all images in same height

    Hi Dude, your code is perfectly working for me. But I need a small favour from you. particular centre item was in perfect height and the remaining are decreasing the sizes. but I need all are in the same size.

    opened by appcarevenkataramana 2
  • How to show and move to the first item

    How to show and move to the first item

    image Hello, i used ScaleYMode, i want to set height for item and recyclerview =100dp, my aim was show only one item. When i opened the app, the recyclerview show the item in position 3 instead of 0. How to show the item 0 first? Please help me, and thanks for reading

    opened by hoang23391 2
  • Make the view as full circle

    Make the view as full circle

    Hi @kHRYSTAL

    Thank you for your effort and sharing this code, I need to know if there is any way that I can use the view as full circle instead of half circle in HORIZONTAL_CIRCL mode.

    How I can achieve that?

    opened by ahmedsalemelzeiny 1
  • App was crashing, if I'm using androidX.

    App was crashing, if I'm using androidX.

    java.lang.NullPointerException: Attempt to read from field 'android.view.View androidx.recyclerview.widget.RecyclerView$ViewHolder.itemView' on a null object reference

    issue at Override method-> onLayout()

    opened by appcarevenkataramana 1
  • auto scroll when open app wehn rtl app

    auto scroll when open app wehn rtl app

    hi i am set android:supportsRtl="false" and tools:replace="android:supportsRtl" in file manifest And when the app opens The recyclerview automatically scrool be and goes to another item And the other does not work properly what should I do i need to android:supportsRtl="false" and tools:replace="android:supportsRtl" my project

    opened by hossein-rezaeian 1
Owner
Matt Yao
developer, kop(LFC), EOS believer, Gambler
Matt Yao
A RecyclerView that implements pullrefresh and loadingmore featrues.you can use it like a standard RecyclerView

XRecyclerView a RecyclerView that implements pullrefresh , loadingmore and header featrues.you can use it like a standard RecyclerView. you don't need

XRecyclerView 5.3k Dec 26, 2022
Using RecyclerView to display data instead of ScrollView or lInearLayout for a strong app. It replaces the ScrollView used in trackMySleep app.

RecyclerView - SleepQualityTracker with RecyclerView app This is the toy app for Lesson 7 of the Android App Development in Kotlin course on Udacity.

Espérant GADA 0 Oct 18, 2021
Add RecyclerView, use Adapter class and ViewHolder to display data.

فكرة المشروع في هذا المشروع سنقوم بعرض قائمة من البيانات للطلاب على واجهة تطبيق Android بإستخدام: مفهوم RecyclerView مفهوم Adapter مفهوم ViewModel محت

Shaima Alghamdi 3 Nov 18, 2021
ScrollableList - learn how to efficiently display a list of text in a RecyclerView and understand its architecture.

ScrollableList Learn how to efficiently display a list of text in a RecyclerView and understand its architecture. activity_main RecyclerView widget he

null 0 Jan 3, 2022
how to handle recyclerView in Kotlin to display grid , vertical , horizontal layouts

Dogglers - Starter Code Starter code for the second independent project for Android Basics in Kotlin. Introduction This is the starter code for the Do

null 0 Mar 28, 2022
Dogglers app uses a RecyclerView in horizontal, vertical and grid view to show a group of CardViews

Welcome to DogglersApp! This app is the final project from Unit 2 of Android Basics in Kotlin given by Google codelabs: https://developer.android.com/

David Ortega Farrerons 1 Feb 25, 2022
ANDROID. ChipsLayoutManager (SpanLayoutManager, FlowLayoutManager). A custom layout manager for RecyclerView which mimicric TextView span behaviour, flow layouts behaviour with support of amazing recyclerView features

ChipsLayoutManager This is ChipsLayoutManager - custom Recycler View's LayoutManager which moves item to the next line when no space left on the curre

Oleg Beloy 3.2k Dec 25, 2022
Carousel Recyclerview let's you create carousel layout with the power of recyclerview by creating custom layout manager.

Carousel Recyclerview let's you create carousel layout with the power of recyclerview by creating custom layout manager.

Jack and phantom 504 Dec 25, 2022
RecyclerView : SleepQualityTracker with RecyclerView app

RecyclerView - SleepQualityTracker with RecyclerView app SleepQualityTracker with RecyclerView This app builds on the SleepQualityTracker developed pr

Kevin 2 May 14, 2022
TikTok-RecyclerView - This is a demo app built using 'Koin' a new dependency injection framework for Android along with RecyclerView and ExoPlayer2.

TikTok-RecyclerView Demo About This is a demo app built using 'Koin' a new dependency injection framework for Android along with RecyclerView and ExoP

Baljeet Singh 19 Dec 28, 2022
Pagination-RecyclerView - Simple and easy way to Paginating a RecyclerView

Pagination-RecyclerView Simple and easy way to Paginating a RecyclerView Android

Rakshit Nawani 0 Jan 3, 2022
The library that removes all boilerplate code allowing you to display lists with few lines of code.

VsRecyclerView The library that removes all boilerplate code allowing you to display lists with few lines of code. Gradle androidExtensions { expe

Valeriy Shtaits 13 Jun 19, 2021
An Android Animation library which easily add itemanimator to RecyclerView items.

RecyclerView Animators RecyclerView Animators is an Android library that allows developers to easily create RecyclerView with animations. Please feel

Daichi Furiya 11.2k Jan 8, 2023
RecyclerView extension library which provides advanced features. (ex. Google's Inbox app like swiping, Play Music app like drag and drop sorting)

Advanced RecyclerView This RecyclerView extension library provides Google's Inbox app like swiping, Play Music app like drag-and-drop sorting and expa

Haruki Hasegawa 5.2k Dec 23, 2022
Android library providing simple way to control divider items (ItemDecoration) of RecyclerView

RecyclerView-FlexibleDivider Android library providing simple way to control divider items of RecyclerView Release Note [Release Note] (https://github

Yoshihito Ikeda 2.4k Dec 18, 2022
Android Library to provide swipe, click and other functionality to RecyclerView

RecyclerViewEnhanced Android Library to provide swipe, click and other functionality to RecyclerView Usage Add this to your build.gradle file dependen

Nikhil Panju 1k Dec 29, 2022
Android library defining adapter classes of RecyclerView to manage multiple view types

RecyclerView-MultipleViewTypeAdapter RecyclerView adapter classes for managing multiple view types Release Note [Release Note] (https://github.com/yqr

Yoshihito Ikeda 414 Nov 21, 2022
Android library for RecyclerView to manage order of items and multiple view types.

recyclerview-binder Android Library for RecyclerView to manage order of items and multiple view types. Features Insert any items to wherever you want

Satoru Fujiwara 185 Nov 15, 2022