# Switcher
**Repository Path**: ouyangpengdev/Switcher
## Basic Information
- **Project Name**: Switcher
- **Description**: Android implementation of switch animation from Oleg Frolov
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-03-23
- **Last Updated**: 2024-11-25
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Switcher
[](https://opensource.org/licenses/Apache-2.0)
[](http://developer.android.com/index.html)
[](https://android-arsenal.com/api?level=17)
[](https://android-arsenal.com/details/1/7460)
Created this cool [switch animation](https://dribbble.com/shots/5429846-Switcher-XLIV) from [Oleg Frolov](https://dribbble.com/Volorf) as an android library.
USAGE
-----
Just add Switcher view in your layout XML and Switcher library in your project via Gradle:
```gradle
dependencies {
implementation 'com.bitvale:switcher:1.1.0'
}
```
XML
-----
```xml
```
You must use the following properties in your XML to change your Switcher.
##### Properties:
* `android:checked` (boolean) -> default true
* `app:switcher_on_color` (color) -> default #48ea8b
* `app:switcher_off_color` (color) -> default #ff4651
* `app:switcher_icon_color` (color) -> default white
* `app:elevation` (dimension) -> default 4dp
Kotlin
-----
```kotlin
switcher.setOnCheckedChangeListener { checked ->
if (checked) action()
}
```
LICENCE
-----
Switcher by [Alexander Kolpakov](https://play.google.com/store/apps/dev?id=7044571013168957413) is licensed under an [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).