☯️Sophisticated and cool intro with Material Motion Animations(No more viewpager transformer or Memory leak)

Overview

Material Intro

Sophisticated and cool intro with Material Motion Animations.

Google

License Profile



Who's using Material Intro?

👉 Check out who's using Material Intro

Include in your project

Maven Central

Gradle

Add the dependency below to your module's build.gradle file:

dependencies {
    implementation("io.github.androidpoet:materialintro:1.0.6")
}

SetUp for Views

<com.androidpoet.materialintro.MaterialIntroView
android:id="@+id/materialintroView"
android:layout_width="match_parent"
android:layout_height="match_parent">
</com.androidpoet.materialintro.MaterialIntroView>
//add views into list
  list.add(R.layout.layout_one)
  list.add(R.layout.layout_two)
  list.add(R.layout.layout_three)


binding.materialIntroFragment.apply {
    setFragmentsList(list)
    enterAnimation = IntroAnimation.SharedAxisXForward
    reenterAnimation = IntroAnimation.SharedAxisXBackward
    enterDuration = 500
    exitDuration = 500
}


//  go next view with animation
binding.nextButton.setOnClickListener {
    binding.materialIntroFragment.next()
}

//  go previous view with animation
binding.backButton.setOnClickListener {
    binding.materialIntroFragment.previous()
}

SetUp for Fragments

<com.androidpoet.materialintro.MaterialIntroFragment
android:id="@+id/materialintroView"
android:layout_width="match_parent"
android:layout_height="match_parent">
</com.androidpoet.materialintro.MaterialIntroFragment>
//add fragments into list
list.add(FragmentOne())
list.add(FragmentTwo())
list.add(FragmentThree())
with(binding.materialintroView) {
    setViewsList(list)
    nextAnimation = IntroAnimation.Fade
    previousAnimation = IntroAnimation.Fade
    nextDuration = 500
    previousDuration = 500
}


//  go next view with animation
binding.nextButton.setOnClickListener {
    binding.materialintroView.next()
}

//  go previous view with animation
binding.backButton.setOnClickListener {
    binding.materialintroView.previous()
}

Supported Animations

IntroAnimation.None
IntroAnimation.FadeThrough
IntroAnimation.Fade
IntroAnimation.SharedAxisXForward
IntroAnimation.SharedAxisYForward
IntroAnimation.SharedAxisZForward
IntroAnimation.SharedAxisXBackward
IntroAnimation.SharedAxisYBackward
IntroAnimation.SharedAxisZBackward
IntroAnimation.ElevationScaleGrow
IntroAnimation.ElevationScale

Create using Builder

This is how to create an instance of the MaterialIntro using kotlin dsl.

val meta = materialIntroFragment(this) {
setEnterAnimation(IntroAnimation.Fade)
setExitAnimation(IntroAnimation.Fade)
setReenterAnimation(IntroAnimation.SharedAxisXBackward)
setReturnAnimation(IntroAnimation.SharedAxisXForward)
setEnterDuration(300)
setExitDuration(300)
setReturnDuration(300)
setReenterDuration(300)
setEnterOverlap(true)
setEnterOverlap(true)
build()
}
meta.next()
meta.previous()
meta.setFragmentsList(list)

We can create the MaterialIntro using MaterialIntro.Builder.

val meta = MaterialIntroFragment.Builder(this)
.setEnterAnimation(IntroAnimation.Fade)
.setExitAnimation(IntroAnimation.Fade)
.setReenterAnimation(IntroAnimation.SharedAxisXBackward)
.setReturnAnimation(IntroAnimation.SharedAxisXForward)
.setEnterDuration(300)
.setExitDuration(300)
.setReturnDuration(300)
.setReenterDuration(300)
.setEnterOverlap(true)
.setEnterOverlap(true)
.build()

meta.next()
meta.previous()
meta.setFragmentsList(list)

MaterialFade


Fade


SharedAxis


Card icons created by Freepik - Flaticon

Find this library useful? ❤️

Support it by joining stargazers for this repository.

License

Copyright 2022 AndroidPoet (Ranbir Singh)

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.
You might also like...
A motion-driven animation framework for Android.
A motion-driven animation framework for Android.

Backboard A motion-driven animation framework for Android. backboard is a framework on top of rebound that makes it easier to use by coupling it to vi

Memory efficient shimmering effect for Android applications by Supercharge.

DEPRECATED - ShimmerLayout Attention: This tool is now deprecated. Please switch to Shimmer for Android or any other shimmer effect solution. ShimmerL

Add Animatable Material Components in Android Jetpack Compose.  Create jetpack compose animations painless.
Add Animatable Material Components in Android Jetpack Compose. Create jetpack compose animations painless.

AnimatableCompose Add Animatable Material Components in Android Jetpack Compose. Create jetpack compose animation painless. What you can create from M

It's a cool animation which can use in splash or somewhere else.

What's Particle ? It's a cool animation which can use in splash or anywhere else. Demo Article 手摸手教你用Canvas实现简单粒子动画 Attributes name format description

Material Design text field that comes in a box, based on (OLD) Google Material Design guidelines.
Material Design text field that comes in a box, based on (OLD) Google Material Design guidelines.

TextFieldBoxes A new Material Design text field that comes in a box, based on Google Material Design guidelines. 🇨🇳 中文看这里 UPDATE NOTICE 1.4.5 Releas

Render After Effects animations natively on Android and iOS, Web, and React Native
Render After Effects animations natively on Android and iOS, Web, and React Native

Lottie for Android, iOS, React Native, Web, and Windows Lottie is a mobile library for Android and iOS that parses Adobe After Effects animations expo

AXrLottie (Android) Renders animations and vectors exported in the bodymovin JSON format. (Using rLottie)
AXrLottie (Android) Renders animations and vectors exported in the bodymovin JSON format. (Using rLottie)

AXrLottie (Android) Renders animations and vectors exported in the bodymovin JSON format. (Using rLottie)

Examples of the use of animations in jetpack compose and view, as well as measurements of perfomance
Examples of the use of animations in jetpack compose and view, as well as measurements of perfomance

AndroidAnimationWorld Примеры использования анимаций в jetpack compose и view, а также замеры perfomance для

Web-based media manager with duplication detection, tagging, and more
Web-based media manager with duplication detection, tagging, and more

reelchest 📦 🎞️ 📽️ A basic web-based media manager. Download or upload clips,

Releases(1.0.7)
Owner
Ranbir Singh
Android Developer • Android Poet•Open Source Contributor•Obsessed with Animations. #DevelopWithGoogle
Ranbir Singh
Chandrasekar Kuppusamy 799 Nov 14, 2022
💠Metaphor is the library to easily add Material Motion animations

Metaphor Metaphor is the library to easily add Material Motion animations. Who's using Metaphor? ?? Check out who's using Metaphor Include in your pro

Ranbir Singh 132 Dec 25, 2022
Combine ViewPager and Animations to provide a simple way to create applications' guide pages.

WoWoViewPager WoWoViewPager combines ViewPager and Animations to provide a simple way to create applications' guide pages. When users are dragging WoW

Nightonke 2.7k Dec 30, 2022
Lightweight Android library for cool activity transition animations

Bungee min SDK 16 (Android Jellybean 4.1) written in Java A lightweight, easy-to-use Android library that provides awesome activity transition animati

Dean Spencer 172 Nov 18, 2022
Library containing common animations needed for transforming ViewPager scrolling for Android v13+.

ViewPagerTransforms Library containing common animations needed for transforming ViewPager scrolling on Android v13+. This library is a rewrite of the

Ian Thomas 2.5k Dec 29, 2022
🍭🚀💗 Tutorials about animations with Animators, Animated Vector Drawables, Shared Transitions, and more

?????? Tutorials about animations with Animators, Animated Vector Drawables, Shared Transitions, and more

Smart Tool Factory 696 Dec 28, 2022
Automatically manipulates the duration of animations dependent on view count. Quicksand .. the more you struggle.

QuickSand When showing a really enchanting explanatory animation to your users, but you know that after a while it'll get tedious and would stop users

Paul Blundell 385 Sep 9, 2022
How to apply meaningful and delightful motion in a sample Android app

Applying meaningful motion on Android How to apply meaningful and delightful motion in a sample Android app Read the complete post at https://medium.c

André Mion 166 Nov 12, 2022
Animation samples with motion layout and object animator 🦹🏻‍♀️

?? Animations ?? Animation samples with motion layout and object animator ????‍♀️ Car Animation with Object Animator ?? ?? I've created this project b

Yağmur Erdoğan 25 Dec 28, 2022
An application demoing meaningful motion on Android

Animate You'll find the supporting medium article for this project here! Animate is a simple application I quickly put together to demo meaningful mot

Joe Birch 3.1k Dec 30, 2022