https://github.com/utsavdotpro/spinningimageview
ImageView that can be spinned on function call. Use it as a onclick loader.
https://github.com/utsavdotpro/spinningimageview
android android-imageview android-library android-loader java ui-component
Last synced: 4 months ago
JSON representation
ImageView that can be spinned on function call. Use it as a onclick loader.
- Host: GitHub
- URL: https://github.com/utsavdotpro/spinningimageview
- Owner: utsavdotpro
- Created: 2021-02-11T12:23:10.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-11T12:57:50.000Z (about 5 years ago)
- Last Synced: 2025-10-09T22:46:47.963Z (4 months ago)
- Topics: android, android-imageview, android-library, android-loader, java, ui-component
- Language: Java
- Homepage:
- Size: 441 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://jitpack.io/#u-barnwal/SpinningImageView)
# SpinningImageView
ImageView that can be spinned on function call. Use it as a onclick loader.
## Sample

## Implementation
**Step 1:** Add to project level build.gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
**Step 2:** Add to app level build.gradle
dependencies {
implementation 'com.github.u-barnwal:SpinningImageView:VERSION'
}
## How to use
**Step 1:** Create view
com.isolpro.library.spinningimageview.SpinningImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_action_reload"
app:siv_alwaysSpinning="false"
app:siv_duration="800"
/>
**Start spinning programmatically**
spinningImageView.spin();
**Stop spinning programmatically**
spinningImageView.stop();
**Auto start spinning and spin till the end**
spinningImageView.setAlwaysSpinning(true);
**Change spin duration**
spinningImageView.setDuration(1000); // 1000ms = 1s
## Features
- Used just like default ImageView widget
- Auto disabling/enabling spin on visibility change (to improve performance)
- Use as smart loader
- Light weight
- Easy to use
## Links
- Inspiration: https://kylewbanks.com/blog/infinitely-rotating-imageview-on-android