MIPagerTransformerView
-- MIPagerTransformer is an android library that provides a seamless image transformation experience.
Overview
|
|
|
|
|
|
|
|
|
|
|
Features
- Quick setup
- Multiple transition styles to choose from
Usage
Dependencies
- Step 1: Add the JitPack repository in your project build.gradle file
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
or
If Android studio version is Arctic Fox or higher then add it in your settings.gradle
dependencyResolutionManagement {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
- Step 2: Add the dependency in your app module build.gradle file
dependencies {
...
implementation 'com.github.Mindinventory:MIPagerTransformerView:x.x.x'
}
Implementation
- Step 1: Add MatchView in your xml and customize attributes
<com.mindinventory.mipagertransformer.MIPagerTransformerView
android:id="@+id/miPagerTransformerView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
Step 2: Provide drawable list to MIPagerTransformerItem ArrayList
val transformerItems: ArrayList<MIPagerTransformerItem> = ArrayList()
image1?.let { transformerItems.add(MIPagerTransformerItem(image1, "Image 1 Description")) }
image2?.let { transformerItems.add(MIPagerTransformerItem(image2, "Image 2 Description")) }
miPagerTransformerView.setTransformerItems(context, transformerItems)
Step 3: Customize as per your requirement
#Set divider between images
miPagerTransformerView.setShowDivider(true, Color.CYAN)
#To allow user initiated scrolling, false to block user initiated scrolling, By Default true
miPagerTransformerView.setInputEnabled(true)
#Styling of the images can be done with the Transformer option
miPagerTransformerView.setPageTransformer(Transformer.SHUTTER)
Guideline for contributors
Contribution towards our repository is always welcome, we request contributors to create a pull request to the develop branch only.
Guideline to report an issue/feature request
It would be great for us if the reporter can share the below things to understand the root cause of the issue.
- Library version
- Code snippet
- Logs if applicable
- Device specification like (Manufacturer, OS version, etc)
- Screenshot/video with steps to reproduce the issue
Requirements
- minSdkVersion >= 21
- Androidx
LICENSE!
MIPagerTransformerView is MIT-licensed.
Let us know!
Weโd be really happy if you send us links to your projects where you use our component. Just send an email to [email protected] And do let us know if you have any questions or suggestion regarding our work.