https://github.com/mindinventory/shimmertextview
ShimmerTextView is a simple library to integrate shimmer effect in your TextView.
https://github.com/mindinventory/shimmertextview
android android-application androidlibrary animation animation-library shimmer shimmer-android shimmer-animation shimmer-effect shimmer-layout shimmer-loading shimmer-text-view textview-android
Last synced: 6 months ago
JSON representation
ShimmerTextView is a simple library to integrate shimmer effect in your TextView.
- Host: GitHub
- URL: https://github.com/mindinventory/shimmertextview
- Owner: Mindinventory
- License: mit
- Created: 2022-07-13T09:14:34.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-27T12:28:59.000Z (about 1 year ago)
- Last Synced: 2024-03-28T08:51:16.402Z (about 1 year ago)
- Topics: android, android-application, androidlibrary, animation, animation-library, shimmer, shimmer-android, shimmer-animation, shimmer-effect, shimmer-layout, shimmer-loading, shimmer-text-view, textview-android
- Language: Kotlin
- Homepage: https://www.mindinventory.com/android-application-development.php
- Size: 1.99 MB
- Stars: 32
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ShimmerTextView [](https://jitpack.io/#Mindinventory/ShimmerTextView)  
====ShimmerTextView is a simple library to integrate shimmer effect in your TextView.

# 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**
```bash
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```**or**
If Android studio version is Arctic Fox or upper then add it in your settings.gradle:
```bash
dependencyResolutionManagement {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```- **Step 2: Add the dependency in your app module build.gradle file**
```bash
dependencies {
...
implementation 'com.github.Mindinventory:ShimmerTextView:x.x.x'
}
```**Implementation**
* Step 1 : Use custom ShimmerTextView in XML.
* 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(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.](https://git.mindinventory.com/mi-android/android-libs/shimmertextview/-/blob/master/LICENSE)### 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](https://www.mindinventory.com/)Please feel free to use this component and let us know if you are interested to building Apps or Designing Products.