• Stars
    star
    367
  • Rank 116,257 (Top 3 %)
  • Language
    Java
  • License
    MIT License
  • Created over 9 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

an iOS-7 Style Switch for android

Download Build Status License

IOS7 风格的Switch开关

IOS7 Style Switch Widget


art1

art3

art4

art5

添加到你的项目中

add to your project


在gradle脚本的dependencies中加入

add follow line to your dependencies in gradle script

compile 'com.7heaven.ioswidget:iosswitch:0.6'

使用

usage



通过setOn(boolean on)方法设置switch状态,setOn(boolean on, boolean animated)的animated参数决定是否以动画方式切换switch状态

using setOn(boolean on) method to set switch state,pass animated to setOn(boolean on, boolean animated) to switch state animated or not

通过isOn()获取switch状态

using isOn() method to get switch state
通过setOnSwitchStateChangeListener方法增加状态改变回调

using setOnSwitchStateChangeListener method to add a callback for switch state change

可在xml文件内通过tintColor标签改变颜色

change tint color using attribute show as follow

art2

More Repositories

1

SHSegmentControl

segmentcontrol widget for android
Java
613
star
2

bitmapMesh

bitmapMesh demo
Java
424
star
3

CurtainSlidingMenu

SlidingMenu With Curtain Effect
Java
317
star
4

GestureLock

a GestureLock that can customize length and style
Java
263
star
5

UILibrary

平时项目开发中写的自定义Drawable、View和Shape
Java
261
star
6

PullRefresh

IOS-style PullRefresh
Java
61
star
7

md2tv

Java
40
star
8

SHSoftwareRasterizer

软光栅器的简单实现
C++
31
star
9

ElegantUnderlineSpan

better underline style span based on romain guy's article https://medium.com/@romainguy/a-better-underline-for-android-90ba3a2e4fb#.tyhk99ywj and repo https://github.com/romainguy/elegant-underline
Java
22
star
10

Bezier

绘制任意阶数的贝塞尔曲线
Java
19
star
11

docktest

mac dock scale style custom view demo
Java
14
star
12

SHZoomView

provide a scaled View for any content on the screen
Java
13
star
13

libgif_comment

给libgif的lib下的代码文件增加注释,方便大家理解libgif的编码解码原理
C
11
star
14

ConfirmView

Java
10
star
15

metaball

Java
10
star
16

SHJavascriptInterface

javascriptinterface for iOS
Objective-C
8
star
17

leetcode_solutions

my solutions to leetcode questions
Java
6
star
18

w3m_iterm

w3m web browser with iterm img protocol support
C
5
star
19

QQ-jump

Java
5
star
20

Compass

IOS7 Style compass
Java
4
star
21

PaintView

A simple Demo for implement a paint board
Java
4
star
22

FC_source

FC原理图
HTML
3
star
23

CameraEffect

camera effect
C
2
star
24

deletedetect

C
2
star
25

RecyclerViewTest

Java
2
star
26

PCF8833-modify

给网上的PCF8833显示屏芯片驱动增加 Bresenham直线 & 吴小林抗锯齿直线绘制方法
C
1
star
27

EasyBitmapMesh

Java
1
star
28

StickableListView

nothing
Java
1
star
29

Waker

it's nothing
Java
1
star
30

jekyll_theme_thinny

HTML
1
star
31

FlipView

nothing yet
Java
1
star
32

perspectiveProject

Objective-C
1
star