Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alielderawi/motionbuttonanimator
A custom animated progress button with sleek transitions for Idle, Loading, and Completed states. Features MVVM architecture, MotionScene animations, notifications, and reactive UI using DataBindingAdapter and Observable.
https://github.com/alielderawi/motionbuttonanimator
animation binding-adapter clean-architecture customview design design-patterns kotlin-android motion mvvm-architecture reactive-programming reactive-ui reactiveui
Last synced: 3 days ago
JSON representation
A custom animated progress button with sleek transitions for Idle, Loading, and Completed states. Features MVVM architecture, MotionScene animations, notifications, and reactive UI using DataBindingAdapter and Observable.
- Host: GitHub
- URL: https://github.com/alielderawi/motionbuttonanimator
- Owner: AliElDerawi
- License: apache-2.0
- Created: 2024-10-26T11:59:48.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2025-01-06T18:40:03.000Z (22 days ago)
- Last Synced: 2025-01-26T13:13:38.477Z (3 days ago)
- Topics: animation, binding-adapter, clean-architecture, customview, design, design-patterns, kotlin-android, motion, mvvm-architecture, reactive-programming, reactive-ui, reactiveui
- Language: Kotlin
- Homepage:
- Size: 1.45 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MotionButtonAnimator [![Build Status][ci-image]][ci]
**"A Custom Animated Progress View (Button) app that animates three statuses of the Button: Idle, Loading, and Completed, with a sleek design, also showcasing a clean architecture."**
MotionButtonAnimator is an app designed to help developers craft an animated view for a download button, featuring a custom design and animation. It allows you to control the view's three statuses, Idle, Progress, and Completed, using XML. The project also uses MotionScene to animate views after opening a fragment. This project is part of the **Udacity Android Kotlin Developer Nanodegree Program**.
## Why This Project?
This project showcases the ability to build custom views, work with **Animators** and **MotionScene**, handle fragment navigation, work with dependency injection, and implement a clean and maintainable MVVM architecture—all critical skills for a mid-senior Android developer.
## Main Features of the Project
- **MVVM Architecture**: Implements an MVVM pattern for clean, maintainable architecture.
- **Custom View**: Creates a custom animated view (button) that can change its attributes using XML.
- **MotionScene**: Implements MotionScene to animate views in the download detail fragment.
- **Orientation Support**: Adapts to portrait and landscape orientations without losing data.
- **Notification Handling**: Displays and handles notifications for all Android versions.
- **Modern UI**: Uses a single-activity architecture with multiple fragments.
- **Download Manager**: Uses a download manager to download from a URL.
- **Dependency Injection**: Koin (v4) used for better modularity and testability.
- **Reactive UI**: Uses DataBindingAdapter and Observable for a reactive user experience.## See It in Action
Watch the custom animated progress button transition between Idle, Loading, and Completed states. This GIF demonstrates the sleek animations and the MotionScene implementation.
Project Showcase
Transitions between Idle, Loading, and Completed states, also MotionScene for Views.## Project Resources
- [Starter Project Code](https://github.com/udacity/nd940-c3-advanced-android-programming-project-starter): Get the starter code for the project.
- [Project Rubric](https://docs.google.com/document/d/1xmW1wM-Ch1pa3Ldoz5TBd-9qXCTSv9LfX2ZOECJrJjE/edit?usp=sharing): View the project rubric.
- [Android Kotlin Developer Nanodegree Program](https://www.udacity.com/course/android-kotlin-developer-nanodegree--nd940): Learn more about the full program and its related projects.#### **Note**: Many improvements and features in this project are not included in the Project Rubric as it was initially a project for the Udacity Nanodegree Program.
## Snapshots from the App
### Phone Screens (Portrait)
Select Download URL Screen
Select a URL for downloading, using MVVM to save and update the status dynamically.
Project Showcase
View transitions between Idle, Loading, and Completed states, also MotionScene for Views.
### Phone Screens (Landscape)
Select Download URL Screen in Landscape Mode
Optimized for a seamless landscape viewing experience.## Customization
### Some Attributes
| Option Name | Format | Description |
| ------------------ | ------- | ---------------------------------------------------- |
| buttonIdleColor | `color` | Sets the Idle color of the button |
| buttonLoadingColor | `color` | Sets the loading fill color of the button |
| circleLoadingColor | `color` | Sets the color of the loading circle |
| textAllCaps | `bool` | Controls button text capitalization (default: false) |
| textStyling | `enum` | Choose between normal, bold, italic, bold_italic |
| cornerSize | `dimen` | Sets the corner radius of the button |
| textSize | `dimen` | Sets the text size of the button |**Here is an example of how to use these attributes in XML:**
```xml
```
## Installation Guide
This project doesn't require any previous setup. Follow these steps to run the app:
1. **Clone the Repository**: Clone the project repository using Git.
2. **Open in Android Studio**: Open the project in **Android Studio Ladybug (2024.2.1 Patch 2)** or later.
3. **Build the Project**: Use **Gradle Plugin v8.7.2** to build the project.**Note:** Ensure you have the latest version of Android Studio and the Gradle build tool installed. Please look at the [official guide](https://developer.android.com/studio/install) if needed.
## Included External Libraries
- **[Koin (v4)](https://github.com/InsertKoinIO/koin)**: Dependency injection framework, allowing modularity and making the project easier to test.
- **[Timber](https://github.com/JakeWharton/timber)**: A lightweight logging utility for debugging purposes.## Contributing
Contributions are welcome! Please open an issue or submit a pull request for improvements or bug fixes. Please feel free to reach out if you want to add more features, such as custom animations, or expand on the MVVM pattern.
### How to Contribute
- **Fork the Repository**: Click the "Fork" button at the top.
- **Create a Feature Branch**: Branch off from `main` for any features (`git checkout -b feature/your-feature`).
- **Submit a Pull Request**: Submit a PR describing your changes.## Contact
Feel free to reach out for any collaboration opportunities or if you have any questions. I'd love to hear your thoughts and contributions!
Check my **[GitHub profile](https://github.com/AliElDerawi)**.## License
This project is open-source and licensed under the Apache 2.0 License. The LICENSE file in this repository provides more details.
[ci-image]: https://img.shields.io/github/actions/workflow/status/AliElDerawi/MotionButtonAnimator/android-kotlin-ci.yml?label=Build%20Status&logo=github
[ci]: https://github.com/AliElDerawi/MotionButtonAnimator/actions?query=workflow%3ABuild