Description
Create carousel effect in recyclerview with the CarouselRecyclerview in a simple way.
Carousel Recyclerview alternatives and similar packages
Based on the "Kotlin" category.
Alternatively, view CarouselRecyclerview alternatives based on common mentions on social networks and blogs.
-
CalendarView
A highly customizable calendar view and compose library for Android and Kotlin Multiplatform. -
Balloon
:balloon: Modernized and sophisticated tooltips, fully customizable with an arrow and animations for Android. -
kotlin-android-template
Android + Kotlin + Github Actions + ktlint + Detekt + Gradle Kotlin DSL + buildSrc = โค๏ธ -
NotyKT ๐๏ธ
๐ NotyKT is a complete ๐Kotlin-stack (Backend + Android) ๐ฑ application built to demonstrate the use of Modern development tools with best practices implementation๐ฆธ. -
Material Chip View
Material Chip view. Can be used as tags for categories, contacts or creating text clouds -
DrawableToolbox
๐ ๏ธ The missing drawable toolbox for Android. Create drawables programmatically and get rid of the boring and always repeated drawable.xml files. -
Navigation Toolbar for Android
:octocat: Navigation toolbar is a slide-modeled UI navigation controller made by @Ramotion -
Pdf Viewer For Android
A Lightweight PDF Viewer Android library which only occupies around 80kb while most of the Pdf viewer occupies up to 16MB space. -
Capturable
๐Jetpack Compose utility library for capturing Composable content and transforming it into Bitmap Image๐ผ๏ธ -
SSComposeCookBook
A Collection of major Jetpack compose UI components which are commonly used.๐๐๐ -
Pluto Debug Framework
Android Pluto is a on-device debugging framework for Android applications, which helps intercept Network calls, capture Crashes & ANRs, manipulate application data on-the-go, and much more. -
CrunchyCalendar โ awesome calendar widget for android apps
A beautiful material calendar with endless scroll, range selection and a lot more! -
SSCustomBottomNavigation
Animated TabBar with native control and Jetpack Navigation support..โจ๐๐ -
Permission Flow for Android
Know about real-time state of a Android app Permissions with Kotlin Flow APIs. -
Only
:bouquet: An easy way to persist and run code block only as many times as necessary on Android. -
Nextflix-Composable
Includes jetpack compose, navigation, paging, hilt, retrofit, coil, coroutines, flow.. -
EasyPermissions-ktx
๐ Kotlin version of the popular google/easypermissions wrapper library to simplify basic system permissions logic on Android M or higher. -
Compose Compiler Reports to HTML Generator
A utility (Gradle Plugin + CLI) to convert Jetpack Compose compiler metrics and reports to beautified HTML page. -
MidJourney Images Compose Multiplatform Mobile Application
This application is developed to display the images created by MidJourney. The application is developed with Compose Multiplatform and works on many platforms including Android and iOS platforms. -
Events Calendar
Events Calendar is a user-friendly library that helps you achieve a cool Calendar UI with events mapping. You can customise every pixel of the calendar as per your wish and still achieve in implementing all the functionalities of the native android calendar in addition with adding dots to the calendar which represents the presence of an event on the respective dates. It can be done easily, you are just a few steps away from implementing your own badass looking Calendar for your very own project! -
FlowMVI
A Kotlin Multiplatform MVI library based on coroutines with a rich DSL and a powerful plugin system. -
SSCustomEditTextOutLineBorder
Same as the Outlined text fields presented on the Material Design page but with some dynamic changes. ๐ ๐ -
TimelineView
A customizable and easy-to-use Timeline View library for Android. Works as a RecyclerView decorator (ItemDecoration) -
Bytemask
Android Gradle Plugin that masks secret strings for the app in the source code making it difficult to extract from reverse engineering.
InfluxDB - Purpose built for real-time analytics at any scale.
Do you think we are missing an alternative of Carousel Recyclerview or a related project?
README
Carousel Recyclerview
Create carousel effect in recyclerview with the CarouselRecyclerview in a simple way.
[Layout manager](./preview/lm.jpg)
Including in your project
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.2.5'
}
Usage
Basic Example for Kotlin
Here is a basic example of implementing carousel recyclerview in koltin files (activity or fragment) with attribute.
binding.carouselRecyclerview.adapter = adapter
binding.carouselRecyclerview.apply {
set3DItem(true)
setAlpha(true)
setInfinite(true)
}
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/carouselRecyclerview"/>
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 Position |
fun setIsScrollingEnabled(isScrollingEnabled: Boolean) | Set scrolling disabled or enabled | true |
## 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)
carouselRecyclerview.setIsScrollingEnabled(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"
/>
Reflection Layout
Now you can show reflection in more efficient way and 3x faster than ReflectionImageView see the codes below
<?xml version="1.0" encoding="utf-8"?>
<com.jackandphantom.carouselrecyclerview.view.ReflectionViewContainer
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android"
app:reflect_relativeDepth="0.5"
app:reflect_gap="0dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/guypro"
android:scaleType="fitXY"
android:id="@+id/image" />
</com.jackandphantom.carouselrecyclerview.view.ReflectionViewContainer>
Notes about Reflection imageview
I would recommend you to use image loading library like Glide for loading image in reflection image for better performance
What's New Version 1.2.5 ๐๐
Fix Adapter notifyItemChanged and notifyItemRemoved
Bugs Fix (Empty List swipe)
Add setIsScrollingEnabled
Remove hardcoded alpha value
Fix divide by zero arithmetic exception
What's New Version 1.2.1
Bugs Fix (ScrollToPosition)
Version 1.2.0
Adding reflection container
Version 1.1.0
Adding Support for orientation changes
Contribute ๐ค
If you like the project and somehow wants to contribute, you are welcome to contribute by either submitting issues, refactor, pull request Thankyou.
Contributors โจ
Thanks go to these wonderful people :
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> Snehil๐ป Mattias Rosberg ๐ป AKASH PATEL๐ป
Find this repository useful? โค๏ธ
Support it by joining stargazers for this repository. :star: 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 all licence references and agreements mentioned in the Carousel Recyclerview README section above
are relevant to that project's source code only.