Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/luongvo/ios-switchview

A lightweight iOS switch view style for Android
https://github.com/luongvo/ios-switchview

android android-widget ios library switch-control

Last synced: 2 months ago
JSON representation

A lightweight iOS switch view style for Android

Awesome Lists containing this project

README

        

# iOS-SwitchView
[![](https://jitpack.io/v/luongvo/iOS-SwitchView.svg)](https://jitpack.io/#luongvo/iOS-SwitchView)

A lightweight iOS switch view style for Android

# Usage
Add SwitchView into xml layout
```xml

```
or custom properties:
```xml

```
Add listener in activty
```java
switchView.setOnCheckedChangeListener(new SwitchView.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(SwitchView switchView, boolean isChecked) {
Toast.makeText(MainActivity.this, "onCheckedChanged: " + isChecked, Toast.LENGTH_SHORT).show();
}
});
```

# Installation
**Step 1.** Add the JitPack repository to your build file
```groovy
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
```
**Step 2.** Add the dependency
```groovy
dependencies {
compile 'com.github.luongvo:iOS-SwitchView:[LATEST_VERSION]'
}
```