弹簧效果切换按钮
2017-10-10 16:50
120 查看
利用facebook的弹簧库
附上github地址:https://github.com/xiaobinbin7530/ReboundButton
Step 1 Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
Step 2 Add the dependency
Step 3
附上github地址:https://github.com/xiaobinbin7530/ReboundButton
Step 1 Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
allprojects { repositories { ... maven { url 'https://jitpack.io' } } }
Step 2 Add the dependency
dependencies { compile 'com.github.xiaobinbin7530:ReboundButton:V1.0' }
Step 3
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.linekong.rebound.myreboundbutton.MainActivity"> <com.linekong.rebound.reboundbutton.MySpringSwitchButton android:id="@+id/myToggleButton" android:layout_width="165dp" android:layout_height="50dp" android:background="#171e23" android:layout_alignParentRight="true" android:layout_marginTop="30dp" android:layout_marginRight="35dp" android:focusable="true" app:leftText = "启用" app:rightText = "禁用" app:textSize="16sp" app:textCheckedColor="#FFFFFF" app:textUnCheckedColor="#5f6465" app:backRectColor="#074ebf" /> </RelativeLayout>
相关文章推荐
- jquery实现的全屏带左右切换按钮和类似风车四叶子旋转切换效果的全屏广告源
- cocos2dx几种菜单按钮(CCMenu)的建立以及播放按钮的切换效果
- 使用 StoryBoard 实现左右按钮切换图片的浏览效果
- 按钮背景效果切换 selector
- vue-video-player 通过自定义按钮组件实现全屏切换效果【推荐】
- Android - ImageButton单击切换按钮图片效果的实现
- 按钮切换效果
- jquery仿QQ商城带左右按钮控制焦点图片切换滚动效果
- 实现点上下左右按钮,小图切换,点小图显示大图的效果
- 8个LED依次循环发光,3种显示效果,要求通过按钮切换
- javascript点击按钮实现隐藏显示切换效果
- atitit.按钮光标滑过高亮切换以及其他动态效果的实现css html js --attilax总结
- Android07_不同按钮的切换效果
- jquery实现隐藏与显示动画效果/输入框字符动态递减/导航按钮切换
- atitit.按钮光标滑过高亮切换以及其他动态效果的实现css html js --attilax总结
- Android 开关按钮切换,类似于iphone 效果,view实现
- ipad 按钮切换时 有闪动效果
- Android - ImageButton单击切换按钮图片效果的实现 .
- javascript点击按钮实现隐藏显示切换效果
- Android - ImageButton单击切换按钮图片效果的实现 .