ShimmerTextView is a simple library to integrate shimmer effect in your TextView.

Overview

ShimmerTextView

ShimmerTextView is a simple library to integrate shimmer effect in your TextView.

image image

Key features

  • Set a base color in ShimmerTextView.
  • Set a highlight color in ShimmerTextView.
  • Set animation duration for shimmer effect(in millisecond).
  • Set animation direction(left_to_right, top_to_bottom, right_to_left, bottom_to_top).
  • Set ShimmerTextView shape(Linear/Radial)

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 upper 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:ShimmerTextView:x.x.x'
	}

Implementation

  • Step 1 : Use custom ShimmerTextView in XML.

      <com.app.shimmertextview.ShimmerTextView
          android:id="@+id/textView"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:text="@string/text_mi"
          android:textSize="24sp"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toEndOf="@id/ivLeftToRight"
          app:layout_constraintTop_toTopOf="@id/ivLeftToRight"
          app:layout_constraintBottom_toTopOf="@id/tvLeftToRight"
          app:shimmer_base_color="@color/dark_red"
          app:shimmer_colored="true"
          app:shimmer_highlight_color="@color/orange"
          android:fontFamily="@font/poppins_bold"
          app:shimmer_duration="3000"
          android:layout_marginHorizontal="16dp"
          android:includeFontPadding="false"/>
    
  • Step 2 : Use all attributes dynamically in your.

      class MainActivity : AppCompatActivity() {
          override fun onCreate(savedInstanceState: Bundle?) {
              super.onCreate(savedInstanceState)
              setContentView(R.layout.activity_main)
                      
              val textView = findViewById<ShimmerTextView>(R.id.textView)
              textView.setBaseColor(ContextCompat.getColor(this, R.color.dark_red))
              .setHighLightColor(ContextCompat.getColor(this, R.color.orange))
              .setDirection(Shimmer.Direction.LEFT_TO_RIGHT)
              .build()
              textView.startShimmer()
          }
      }
    

XML Properties

Properties Description
shimmer_base_color Set base color of ShimmerTextView
Shimmer_highlight_color Set highlight color of shimmer animation
shimmer_colored Set it to true for colored ShimmerTextView
shimmer_duration Set duration for animation
shimmer_direction Set animation direction(left_to_right,top_to_bottom, right_to_left, bottom_to_top)

That's it 👍 and you're good to go 🚀

Guideline to report an issue/feature request


It would be very helpful 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.
  • Screenshot/video with steps to reproduce the issue.

LICENCE


ShimmerTextView is MIT-licensed.

Let us know!


If you use open-source libraries in your project, please make sure to credit us and Give a star to www.mindinventory.com

Please feel free to use this component and let us know if you are interested to building Apps or Designing Products.

You might also like...
Implementation of Ripple effect from Material Design for Android API 9+
Implementation of Ripple effect from Material Design for Android API 9+

RippleEffect ExpandableLayout provides an easy way to create a view called header with an expandable view. Both view are external layout to allow a ma

explosive dust effect for views
explosive dust effect for views

ExplosionField explosive dust effect for views Getting started In your build.gradle: dependencies { compile 'tyrantgit:explosionfield:1.0.1' } Ex

Glass-break effect for views

BrokenView Glass-break effect for views. Demo Download APK Usage Android Studio dependencies { compile 'com.zys:brokenview:1.0.3' } Eclipse Just pu

:sparkles: An easy way to implement an elastic touch effect for Android.
:sparkles: An easy way to implement an elastic touch effect for Android.

ElasticViews ✨ An easy way to implement an elastic touch effect for Android. Including in your project Gradle Add below codes to your root build.gradl

An easy, flexible way to add a shimmering effect to any view in an Android app.
An easy, flexible way to add a shimmering effect to any view in an Android app.

Shimmer for Android Shimmer is an Android library that provides an easy way to add a shimmer effect to any view in your Android app. It is useful as a

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

A pager for Android with parallax effect

ParallaxPagerTransformer A pager transformer for Android with parallax effect Installation in your build.gradle file dependencies { // ... com

Wave effect of activity animation
Wave effect of activity animation

WaveCompat Wave effect of activity animation How to use 1. Bind wave touch helper to a view which will start an activity when it clicked: WaveTouchHel

"Gooey-Effect" for android-compose

Gooey effect for android-compose "Gooey" is a library made to use "gooey-effect" that exists as a CSS trick in android-compose. Download repositories

Releases(0.0.1)
Owner
MindInventory
MindInventory works with Enterprises, Startups, and Agencies since 2011 providing web, mobile app development, enterprise mobility solutions & DevOps services.
MindInventory
Android Country Picker is a Kotlin-first, flexible and powerful Android library that allows to integrate Country Picker with just a few lines.

1. Add dependency dependencies { implementation 'com.hbb20:android-country-picker:X.Y.Z' } For latest version, 2. Decide your use-case

Harsh B. Bhakta 65 Dec 6, 2022
[] Easily have blurred and transparent background effect on your Android views.

##[DEPRECATED] BlurBehind Easily have blurred and transparent background effect on your Android views. Before API level 14 there was a Window flag cal

Gokberk Ergun 516 Nov 25, 2022
Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. The library is based on the code of Mario Klingemann.

Android StackBlur Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. Th

Enrique López Mañas 3.6k Dec 29, 2022
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

Burhanuddin Rashid 1k Jan 1, 2023
EtsyBlur is an Android library that allows developers to easily add a glass-like blur effect implemented in the Etsy app.

EtsyBlur EtsyBlur is an Android library that allows developers to easily add a glass-like blur effect implemented in the past Etsy app. Try out the sa

Manabu S. 755 Dec 29, 2022
Library project to display DialogFragment with a blur effect.

BlurDialogFragment This project allows to display DialogFragment with a burring effect behind. The blurring part is achieved through FastBlur algorith

tvbarthel 2.1k Dec 29, 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
Android ImageViews animated by Ken Burns Effect

KenBurnsView Android library that provides an extension to ImageView that creates an immersive experience by animating its drawable using the Ken Burn

Flávio Faria 2.7k Jan 2, 2023
ViewAnimator view with a lollipop style reveal effect

ViewRevealAnimator Widget ViewAnimator view with a lollipop style reveal effect. Regular animation can be set (just like the default ViewAnimator) for

Alessandro Crugnola 339 Jun 3, 2022
Android L Ripple effect wrapper for Views

Material Ripple Layout Ripple effect wrapper for Android Views Including in your project compile 'com.balysv:material-ripple:1.0.2' Check for latest v

Balys Valentukevicius 2.3k Dec 29, 2022