FadingToolbar is an animation library which fades out your footer view in a ScrollView/RecyclerView and fades in a toolbar title

Overview

FadingToolbar

Version minSdkVersion compileSdkVersion

FadingToolbar is an animation library which fades out your footer view in a ScrollView/RecyclerView and fades in a toolbar title (analogue of the LargeTitle animation in iOS). Main points:

  • Supports both XML and Compose.
  • Easy to use - just pass your UI components and they will be animated right away
  • Kotlin-based and lightweight.

Sample

Download

Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {  
        ...
        maven { url 'https://jitpack.io' }
    }
}

Add the dependency (you can put one of them or include both)

dependencies {
    implementation 'com.github.PineapplePie.FadingToolbar:fadingtoolbar:1.0.1' // XML version
    implementation 'com.github.PineapplePie.FadingToolbar:fadingtoolbar-compose:1.0.1' // Compose version
}

Usage

For a full example take a look at the sample module.

Compose version

Compose version of the library consists of a custom LazyColumn container and simple configs for your texts. It supports all Text and LazyColumn parameters and settings.

// Toolbar title text customization

val topBarTextConfig = TextConfig.Builder()
    .textFontSize(20.sp)
    .textFontWeight(FontWeight.SemiBold)
    .textModifier(
        Modifier.padding(horizontal = 16.dp, vertical = 8.dp)
    )
    .build()

// Footer text customization

val footerTextConfig = TextConfig.Builder()
    .textFontSize(32.sp)
    .textFontWeight(FontWeight.Bold)
    .textModifier(
        Modifier.padding(horizontal = 16.dp, vertical = 8.dp)
    )
    .build()

FadingTopBarLazyColumn(
    listContent = { 
        // your item or items here
        item {}
        item {}
        item {}
    },
    topBarText = "Your text here!", // your text here
    footerText = "Your second text here!", // your text here, but you can skip it if both texts are the same
    topBarTextConfig = topBarTextConfig,
    topBarBackgroundColor = Color.White, // your color here
    footerTextConfig = footerTextConfig,
 )

XML version

XML version of the library is implemented as a separate animator helper class. It supports ScrollView and RecyclerView set ups, but doesn't provide basic containers compared to the Compose version.

RecyclerView

private val animator by lazy { FadingToolbarAnimator() }

private fun setupAnimator() = with(binding) {
    animator.bind(toolbar, recyclerView) // your Toolbar and RecyclerView here
}

ScrollView

private val animator by lazy { FadingToolbarAnimator() }

private fun setupAnimator() = with(binding) {
    animator.bind(toolbar, footerView, scrollView) // your Toolbar, footer View and RecyclerView here
}

License

FadingToolbar is licensed under the Apache License 2.0.

You might also like...
Cute view animation collection.
Cute view animation collection.

Android View Animations One day, I saw an iOS library, which is a view shaker, it's very beautiful. I think Android also need one, and should be bette

Customizable bounce animation for any view like in Clash Royale app
Customizable bounce animation for any view like in Clash Royale app

Bounceview-Android Customizable bounce animation for any view updation Getting Started In your build.gradle dependencies { implementation 'hari.bo

Deprecated in favour of https://developer.android.com/reference/android/support/v4/view/animation/PathInterpolatorCompat.html

Deprecated: use https://developer.android.com/reference/android/support/v4/view/animation/PathInterpolatorCompat.html instead. android-cubic-bezier-in

Animation View to Highlight particular Views 🎯 for Android
Animation View to Highlight particular Views 🎯 for Android

TargetView Animation View to Highlight particular Views 🎯 for Android, it can be Used with Views that you see important (Like CountDownTimer), And al

create your custom themes and change them dynamically with ripple animation
create your custom themes and change them dynamically with ripple animation

Android Animated Theme Manager create your custom themes and change them dynamically with ripple animation Features support java and kotlin projects.

A beautiful ripple animation for your app
A beautiful ripple animation for your app

Android Ripple Background A beautiful ripple animation for your app. You can easily change its color, speed of wave, one ripple or multiple ripples. S

A Simple Todo app design in Flutter to keep track of your task on daily basis. Its build on BLoC Pattern. You can add a project, labels, and due-date to your task also you can sort your task on the basis of project, label, and dates
A Simple Todo app design in Flutter to keep track of your task on daily basis. Its build on BLoC Pattern. You can add a project, labels, and due-date to your task also you can sort your task on the basis of project, label, and dates

WhatTodo Life can feel overwhelming. But it doesn’t have to. A Simple To-do app design in flutter to keep track of your task on daily basis. You can a

FPSAnimator is very easy animation library for Android TextureView and SurfaceView.
FPSAnimator is very easy animation library for Android TextureView and SurfaceView.

FPSAnimator A simple but powerful Tween / SpriteSheet / ParabolicMotion / animation library for Android TextureView and SurfaceView. Features The cont

User onboarding library with smooth animation of objects and background colors
User onboarding library with smooth animation of objects and background colors

SlidingTutorial Cleveroad introduces Sliding Tutorial Library for Flutter Hey guys, hope you haven’t started developing a tutorial for your Flutter ap

Releases(1.0.3)
Owner
Hanna
Hanna
💳 Bank Card View is a simple and elegant card view with Flip animation.

Visualização de cartão bancário ?? Bank Card View é uma visualização de cartão simples e elegante com animação Flip. Versões Selecione a língua : Engl

Geovani Amaral 9 Aug 26, 2022
Road Runner is a library for android which allow you to make your own loading animation using a SVG image

Road Runner Road Runner is a library for android which allow you to make your own loading animation using a SVG image Sample video View in Youtube Dem

Adrián Lomas 1.2k Nov 18, 2022
Android Animation Easing Functions. Let's make animation more real!

Android Easing Functions This project is originally from my another project, AndroidViewAnimation, which is an animation collection, to help you make

代码家 2.5k Jan 4, 2023
Chandrasekar Kuppusamy 799 Nov 14, 2022
Android Library to create Lottie animation view dialog easily with a lot of customization

LottieDialog Android Library to create Lottie animation view dialog easily with a lot of customization Why you should use Lottie Dialog You have no li

Amr Hesham 39 Oct 7, 2022
Android Library to create Lottie animation view dialog easily with a lot of customization

Android Library to create Lottie animation view dialog easily with a lot of customization

Amr Hesham 39 Oct 7, 2022
An Android library which provides simple Item animations to RecyclerView items

RecyclerViewItemAnimators Library Travis master: This repo provides: Appearance animations Simple animators for the item views Quick start You can now

Gabriele Mariotti 3.1k Dec 16, 2022
A customised EditText view serving the purpose of taking numeric One Time Password from a user. With stunning animation, and high customizability.

PassCodeText A customised EditText view serving the purpose of taking numeric One Time Password from a user. With stunning animation, and high customi

Swapnil Tiwari 107 Nov 16, 2022
A component for flip animation on Android, which is similar to the effect in Flipboard iPhone/Android

android-flip Aphid FlipView is a UI component to accomplish the flipping animation like Flipboard does. A pre-built demo APK file for Android OS 2.2+

Bo 2.8k Dec 21, 2022
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

巴掌 1.4k Dec 12, 2022