All Projects → jtv7 → RippleSwitch

jtv7 / RippleSwitch

Licence: other
Custom Android Switch widget

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to RippleSwitch

Mirage
Reimplementation of the Nintendo Switch firmware
Stars: ✭ 40 (+150%)
Mutual labels:  switch
react-native-multi-toggle-switch
MultiToggle Switch for React-Native
Stars: ✭ 17 (+6.25%)
Mutual labels:  switch
Nintendo-Switch-JoyCon-Hack
Hardwiring a push button in a JoyCon to grant bootloader access
Stars: ✭ 44 (+175%)
Mutual labels:  switch
LimitlessUI
Awesome C# UI library that highly reduced limits of your application looks
Stars: ✭ 41 (+156.25%)
Mutual labels:  switch
CustomSwitch
Custom Switch package created in Flutter
Stars: ✭ 56 (+250%)
Mutual labels:  switch
UserDeviceTracker
快速定位一个IP或MAC在你的网络中的位置,是网络工程师提高工作效率的利器,也可以为CMDB提供基础网络数据。
Stars: ✭ 36 (+125%)
Mutual labels:  switch
RevealLayout
揭示效果布局,可以指定2个子布局,以圆形揭示效果切换选中状态
Stars: ✭ 118 (+637.5%)
Mutual labels:  switch
aos-switch-ansible-collection
Ansible collection for AOS-Switch switches
Stars: ✭ 29 (+81.25%)
Mutual labels:  switch
git-profile
↔️ Git Profile allows you to switch between multiple user profiles in git repositories
Stars: ✭ 41 (+156.25%)
Mutual labels:  switch
OctopathTraveler
Switch OctopathTraveler SaveDate Editor
Stars: ✭ 32 (+100%)
Mutual labels:  switch
MD UISwitch
Uniformly encapsulate different types of switches as user input devices
Stars: ✭ 33 (+106.25%)
Mutual labels:  switch
SwitchCaseGenerator
An Xcode Source Editor Extension that generates a swift switch case statement based on selected enum cases
Stars: ✭ 63 (+293.75%)
Mutual labels:  switch
OnlySwitch
⚙️ All-in-One menu bar app, hide 💻MacBook Pro's notch, dark mode, AirPods, Shortcuts
Stars: ✭ 1,288 (+7950%)
Mutual labels:  switch
nxquake
TyrQuake ported to Nintendo Switch
Stars: ✭ 17 (+6.25%)
Mutual labels:  switch
switch-ssh-go
A packaged SSH library for switches (huawei,h3c,cisco)
Stars: ✭ 53 (+231.25%)
Mutual labels:  switch
NeewerLite
NeewerLite is an un-official Neewer LED light control app for macOS.
Stars: ✭ 54 (+237.5%)
Mutual labels:  switch
Homebrew-Guide
Guide for getting CFW setup on your Nintendo Switch (And Wii U)
Stars: ✭ 104 (+550%)
Mutual labels:  switch
homebridge-switcheroo
Simple on/off or multiswitch radio buttons for http reqs. Useful for lights, A/V systems, home automation, whatever
Stars: ✭ 38 (+137.5%)
Mutual labels:  switch
eBookReaderNX
A Nintendo Switch eBook Reader
Stars: ✭ 15 (-6.25%)
Mutual labels:  switch
SwiTAS
A usable toolkit for creating Nintendo Switch TASes with homebrew
Stars: ✭ 54 (+237.5%)
Mutual labels:  switch

Release

RippleSwitch

This library is a custom Switch widget inspired by this dribbble shot.

GifSample

Gradle

Add the JitPack repository in your build.gradle at the end of repositories:

allprojects {
    repositories {
    	...
        maven { url 'https://jitpack.io' }
    }
}

And add the dependencies

dependencies {
    compile 'com.github.jtv7:RippleSwitch:1.0'
}

Sample

Please see the sample app for a library usage example.

Wiki

Usage:

Add RippleSwitch to your view hieararchy. Either programatically or using xml:

<com.jtv7.rippleswitchlib.RippleSwitch
        android:id="@+id/rippleSwitch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

API

General

Default selection can be set using:

<com.jtv7.rippleswitchlib.RippleSwitch
  app:rs_checked="true|false"/>

Setting colors:

<com.jtv7.rippleswitchlib.RippleSwitch
  app:rs_checked_color="#FFFFFF"
  app:rs_unchecked_color="#2C2C2C"/>

Can also be set with the following setter methods:

rippleSwitch.setChecked(true);
rippleSwitch.setCheckedColor(Color.WHITE);
rippleSwitch.setUncheckedColor(Color.parseColor("#2C2C2C"));                          

Other

Getting current checked state:

rippleSwitch.isChecked()

Callback

To listen for the check changed events use:

rippleSwitch.setOnCheckedChangeListener(this);

public interface OnCheckedChangeListener {
        void onCheckChanged(boolean checked);
    }

License

Copyright 2018 jtv7

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].