All Projects → sparrow007 → Carouselrecyclerview

sparrow007 / Carouselrecyclerview

Licence: apache-2.0
Carousel Recyclerview let's you create carousel layout with the power of recyclerview by creating custom layout manager.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Carouselrecyclerview

Discretescrollview
A scrollable list of items that centers the current element and provides easy-to-use APIs for cool item animations.
Stars: ✭ 5,533 (+5071.03%)
Mutual labels:  layoutmanager, recyclerview, android-ui, carousel
Stacklayoutmanager
customized layoutmanager,let item pile up like stackview/类似最美有物卡片堆叠效果
Stars: ✭ 343 (+220.56%)
Mutual labels:  layoutmanager, recyclerview, android-ui
Easyadapter
Recyclerview adapter library- Create adapter in just 3 lines of code
Stars: ✭ 122 (+14.02%)
Mutual labels:  recyclerview, android-ui
Timetablelayout
TimetableLayout is a RecyclerView.LayoutManager to display the timetable for Android.
Stars: ✭ 726 (+578.5%)
Mutual labels:  layoutmanager, recyclerview
Codeview Android
Display code with syntax highlighting ✨ in native way.
Stars: ✭ 748 (+599.07%)
Mutual labels:  recyclerview, android-ui
Androidribbon
🎀 The simple way to implement a beautiful ribbon with the shimmering on Android.
Stars: ✭ 502 (+369.16%)
Mutual labels:  recyclerview, android-ui
Awesome Recyclerview Layoutmanager
RecyclerView-LayoutManager Resources
Stars: ✭ 581 (+442.99%)
Mutual labels:  layoutmanager, recyclerview
Gallerylayoutmanager
New way to implements ViewPager/Gallery in Android with RecycleView
Stars: ✭ 684 (+539.25%)
Mutual labels:  layoutmanager, recyclerview
Androidveil
🎭 An easy, flexible way to implement veil skeletons and shimmering effect for Android.
Stars: ✭ 792 (+640.19%)
Mutual labels:  recyclerview, android-ui
Multilinedivider
Multi divider in RecyclerView on Android.
Stars: ✭ 13 (-87.85%)
Mutual labels:  recyclerview, android-ui
Turn Layout Manager
A carousel layout manager for RecyclerView
Stars: ✭ 946 (+784.11%)
Mutual labels:  layoutmanager, recyclerview
Spannedgridlayoutmanager
Android RecyclerView.LayoutManager that resizes and reorders views based on SpanSize
Stars: ✭ 492 (+359.81%)
Mutual labels:  layoutmanager, recyclerview
Scrollingpagerindicator
Pager indicator inspired by Instagram. Lightweight and easy to set up.
Stars: ✭ 419 (+291.59%)
Mutual labels:  recyclerview, android-ui
Zoomrecylerlayout
🎢 Zoom Recycler Layout Manager For Android Kotlin
Stars: ✭ 618 (+477.57%)
Mutual labels:  recyclerview, android-ui
Stackcardlayoutmanager
Stars: ✭ 376 (+251.4%)
Mutual labels:  layoutmanager, recyclerview
Recyclerstickyheaderview
Sticky header view or suspending view for RecyclerView.
Stars: ✭ 347 (+224.3%)
Mutual labels:  recyclerview, android-ui
Horizontalpicker
A simple, customizable and easy to use picker where centre view is scaled up
Stars: ✭ 337 (+214.95%)
Mutual labels:  layoutmanager, recyclerview
Reel Search Android
Reel Search for Android is a UI/UX design for autocomplete action. It is a beautiful minimalistic addition to any use case.
Stars: ✭ 110 (+2.8%)
Mutual labels:  layoutmanager, recyclerview
Focuslayoutmanager
有焦点item的水平/垂直滚动RecyclerView-LayoutManager。仿Android豆瓣书影音“推荐“频道列表布局
Stars: ✭ 772 (+621.5%)
Mutual labels:  layoutmanager, recyclerview
Cardswipelayout
Use RecyclerView to achieve card swipe layout , like Tantan . (模仿探探卡片滑动效果的布局)
Stars: ✭ 1,081 (+910.28%)
Mutual labels:  layoutmanager, recyclerview

Carousel Recyclerview

Create carousel effect in recyclerview with the CarouselRecyclerview in a simple way.

License License License

Layout manager

Including in your project

Maven Central with version prefix filter CarouselRecyclerview

Gradle

Add below codes to your root build.gradle file (not your module build.gradle file).

allprojects {
    repositories {
            mavenCentral()
    }
}

And add a dependency code to your module's build.gradle file.

dependencies {
   implementation 'com.github.sparrow007:carouselrecyclerview:1.0.0'
}

Usage

Basic Example for Kotlin

Here is a basic example of implementing carousel recyclerview in koltin files (activity or fragment) with attribute.

  val carouselRecyclerview = findViewById<CarouselRecyclerview>(R.id.recycler)
  carouselRecyclerview.adapter = adapter

Basic Example for XML

Here is a basic example of implementing carousel recyclerview in layout xml.

<com.jackandphantom.carouselrecyclerview.CarouselRecyclerview
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:id="@+id/recycler"/>
Property infinite and 3D on Item enabled Property infinite and alpha on Item enabled

API Methods

Method Description Default
fun set3DItem(is3DItem: Boolean) Make the view tilt according to their position, middle position does not tilt. false
fun setInfinite(isInfinite: Boolean) Create the loop of the given view means there is no start or end, but provided position in the interface will be correct. false
fun setFlat(isFlat: Boolean) Make the flat layout in the layout manager of the reyclerview false
fun setAlpha(isAlpha: Boolean) Set the alpha for each item depends on the position in the layout manager false
fun setIntervalRatio(ratio: Float) Set the interval ratio which is gap between items (views) in layout manager 0.5f (value of gap, it should in range (0.4f - 1f))
fun getCarouselLayoutManager(): CarouselLayoutManager Get the carousel layout manager instance
fun getSelectedPosition(): Int Get selected position from the layout manager center view Positoin

API Methods Usage

val carouselRecyclerview = findViewById<CarouselRecyclerview>(R.id.recycler)
      carouselRecyclerview.adapter = adapter
      carouselRecyclerview.set3DItem(true)
      carouselRecyclerview.setInfinite(true)
      carouselRecyclerview.setAlpha(true)
      carouselRecyclerview.setFlat(true)
      val carouselLayoutManager = carouselRecyclerview.getCarouselLayoutManager()
      val currentlyCenterPosition = carouselRecyclerview.getSelectedPosition()

Item Position Listener

You can listen to the position whenever the scroll happens you will get notified about the position, following are codes for listener

 carouselRecyclerview.setItemSelectListener(object : OnSelected {
          override fun onItemSelected(position: Int) {
              //Cente item
          }
      })

Reflection ImageView

You see in the demo that there is a mirror image (reflection imageview), for this i already created custom imageview for this.

Use ReflectionImageView in xml layout and provide src

 <com.jackandphantom.carouselrecyclerview.view.ReflectionImageView
     android:layout_width="120dp"
     android:layout_height="120dp"
     android:scaleType="fitXY"
     android:src="@drawable/hacker"
    />

Notes about Reflection imageview

I would recommend you to use image loading library like Glide for loading image in reflection image for better performance

Contribute 🤝

If you like the project and somehow wants to contribute, you are welcome to contribute by either submitting issues, refactor, pull request Thankyou.

Find this repository useful? ❤️

Support it by joining stargazers for this repository. ⭐️
And follow me for next creation 🤩

License

Copyright 2021 Sparrow007 (Ankit kumar)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].