Skip to content

ChengangFeng/TickView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a3c496d · Dec 11, 2017

History

43 Commits
Oct 26, 2017
Oct 31, 2017
Oct 21, 2017
Oct 27, 2017
Dec 11, 2017
Oct 17, 2017
Oct 27, 2017
Oct 29, 2017
Oct 27, 2017
Oct 17, 2017
Oct 17, 2017
Oct 17, 2017
Oct 17, 2017

Repository files navigation

TickView

一个精致的打钩小动画,模仿轻芒杂志标记已读的动画

效果图

使用

Step 1

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

Step 2

dependencies {
    compile 'com.github.ChengangFeng:TickView:v1.0.2'
}

Step 3

xml配置

<com.github.chengang.library.TickView
    android:id="@+id/tick_view_accent"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:check_base_color="@color/colorAccent"
    app:rate="normal" />

点击事件回调

tickView.setOnCheckedChangeListener(new TickView.OnCheckedChangeListener() {
    @Override
    public void onCheckedChanged(TickView tickView, boolean isCheck) {
        //do something here
    }
});

模拟点击效果

tickView.toggle();

手动更改控件状态

tickView.setChecked(true);

思路实现

优化思路