状态可以通过动画切换的按钮--第三方开源--TickPlusDrawable

Android tickplusdrawable(TickPlusDrawable)在github上的项目主页是:https://github.com/flavienlaurent/tickplusdrawable
测试代码:
布局:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"> <View
android:id="@+id/view"
android:layout_gravity="center"
android:padding="30dp"
android:layout_width="128dp"
android:layout_height="128dp" /> </FrameLayout>
JAVA代码:
package com.flavienlaurent.tickplusdrawable; import android.annotation.TargetApi;
import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import android.view.View; public class MainActivity extends Activity { @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main); View view = findViewById(R.id.view); // 第一个参数表示里面+号和勾的宽度,第二个参数是圆圈背景色和勾的颜色,
//第三个参数是默认的加号的颜色,只显示一次 final TickPlusDrawable tickPlusDrawable = new TickPlusDrawable(10,
0xff9C27B0, 0xff2196F3); view.setBackground(tickPlusDrawable); view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
tickPlusDrawable.toggle();
}
});
}
}
相关文档:
http://www.cnblogs.com/zzw1994/p/4999461.html
状态可以通过动画切换的按钮--第三方开源--TickPlusDrawable的更多相关文章
- FloatingActionButton增强版,一个按钮跳出多个按钮--第三方开源--FloatingActionButton
FloatingActionButton项目在github上的主页:https://github.com/futuresimple/android-floating-action-button F ...
- 实现多层抽屉菜单,点击其中一项会动画打开该抽屉--第三方开源--MultiCardMenu
下载地址:https://github.com/wujingchao/MultiCardMenu <net.wujingchao.android.view.MultiCardMenu xmlns ...
- JS框架_(JQuery.js)文章全屏动画切换
百度云盘 传送门 密码:anap 文章全屏动画切换效果 <!doctype html> <html lang="zh"> <head> < ...
- Unity---动画系统学习(4)---使用混合树(Blend Tree)来实现走、跑、转弯等的动画切换
1. 介绍 Blend Tree用于多个动画之间的混合,比如走到跑的切换.转弯的切换. 如果用动画学习笔记(3)中的方法,需要新建很多的状态,不仅麻烦,而且切换状态时也很容易不流畅. 而Blend T ...
- Activity左边滑出,右边滑入的动画切换
Activity左边滑出,右边滑入的动画切换 转载请注明出处:http://blog.csdn.net/u012301841/article/details/46920809 大家都知道Android ...
- jQuery鼠标悬停内容动画切换效果
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- JQuery动画插件Velocity.js发布:更快的动画切换速度
5月3日,Julian在其GitHub上发布了Velocity.js.Velocity.js是一款动画切换的jQuery插件,它重新实现了jQuery的$.animate()方法从而加快动画切换的速度 ...
- ACtivity实现欢迎界面并添加动画切换效果
先看效果: 中间切换动画没来得及截图,凑合着看吧. 主要是java代码的实现: Welcom.java package kehr.activity.welcome; import android.ap ...
- Velocity.js发布:更快的动画切换速度
Velocity.js是一款动画切换的jQuery插件,它重新实现了jQuery的$.animate()方法从而加快动画切换的速度.Velocity.js只有7k的大小,它不仅包含了$.animate ...
随机推荐
- spring的框架集,简化的编程模型
spring batch spring intergration spring ws spring jms spring-mvc -> spring-rest resthate z
- VML/SVG在Web开发中一些常见的框架
1.借鉴自: http://www.codefans.net/soft/3061.shtml 来源于网上. flowchart.js http://adrai.github.io/flowchart ...
- Shell | grep with n following lines
'foo' sample.txt ➜ dex-method-counts git:(master) ./dex-method-counts ~/Downloads/n.apk | 'hui' hui: ...
- OS X 升级 Yosemite 后,Intellij IDEA 与 VirtualBox 启动失败
报错: Dyld Error Message: Symbol not found: _CGContextSetAllowsAcceleration Referenced from: /Library/ ...
- apk重新签名
re-sign.jar中后自动去除签名这个方法,经试验不可用! 1.去除准备重新签名SinaVoice.apk软件本身的签名 将apk文件后缀改为.zip,然后从winrar中删除META-INF文件 ...
- Unity AssetBundles and Resources指引 (二) Resources文件夹
本文内容主要翻译自下面这篇文章 https://unity3d.com/cn/learn/tutorials/topics/best-practices/guide-assetbundles-and- ...
- SICP 1.1-1.5
1.1 a = b = nil 1.2 (/ (+ (- (- (+ (/ ))))) (* (- ) (- )) 1.3 a = b = nil 1.4... 1.5 (define (p) (p) ...
- 【翻译习作】 Windows Workflow Foundation程序开发-第一章01
第 1 章 欢迎来到工作流的世界 …思想如蝴蝶般飞到我身边 —— Gossard / Vedder (译注:Gossard与Vedder是来自Pearl Jam乐队的2名乐手,该句出自他们的歌曲 ...
- centos 7 安装音乐播放器(亲测可用)
方法来源网上,非原创. 1. Install the nux repo $> su - $> yum update # optional but recommanded $> rp ...
- .net orm比较之dapper和Entity Framework6的简单测试比较
.net orm比较之dapper和Entity Framework6的简单测试比较