expressview

Micro-Interaction library to animate like, react or other actions in an Android app.

Лицензия

Лицензия

Группа

Группа

co.ankurg.expressview
Идентификатор

Идентификатор

expressview
Последняя версия

Последняя версия

0.0.3
Дата

Дата

Тип

Тип

aar
Описание

Описание

expressview
Micro-Interaction library to animate like, react or other actions in an Android app.
Ссылка на сайт

Ссылка на сайт

https://github.com/ankurg22/ExpressView
Система контроля версий

Система контроля версий

https://github.com/ankurg22/ExpressView/tree/main

Скачать expressview

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/co.ankurg.expressview/expressview/ -->
<dependency>
    <groupId>co.ankurg.expressview</groupId>
    <artifactId>expressview</artifactId>
    <version>0.0.3</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/co.ankurg.expressview/expressview/
implementation 'co.ankurg.expressview:expressview:0.0.3'
// https://jarcasting.com/artifacts/co.ankurg.expressview/expressview/
implementation ("co.ankurg.expressview:expressview:0.0.3")
'co.ankurg.expressview:expressview:aar:0.0.3'
<dependency org="co.ankurg.expressview" name="expressview" rev="0.0.3">
  <artifact name="expressview" type="aar" />
</dependency>
@Grapes(
@Grab(group='co.ankurg.expressview', module='expressview', version='0.0.3')
)
libraryDependencies += "co.ankurg.expressview" % "expressview" % "0.0.3"
[co.ankurg.expressview/expressview "0.0.3"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.jetbrains.kotlin : kotlin-stdlib jar 1.4.10
androidx.core » core-ktx jar 1.3.2
androidx.appcompat » appcompat jar 1.2.0

Модули Проекта

Данный проект не имеет модулей.

ExpressView

A micro-interaction library which enables animation for various actions or reactions. Inspired from Twitter's and Instagram's like button animation.

Platform API Twitter

ExpressView sample gif

Gradle Dependency

dependencies {
    implementation "co.ankurg.expressview:expressview:0.0.3"
}

XML

<co.ankurg.expressview.ExpressView
        android:id="@+id/likeButton"
        android:layout_width="64dp"
        android:layout_height="64dp" />

Observing check state

View reacts to clicks and maintains the state on its own. To listen to the check state change, implement the following callback.

import co.ankurg.expressview.OnCheckListener
...
likeButton.setOnCheckListener(object : OnCheckListener {
    override fun onChecked(view: ExpressView?) {
        Log.d(TAG, "Checked")
    }
    override fun onUnChecked(view: ExpressView?) {
        Log.d(TAG, "Unchecked")
    }
})

Attributes

Name Description Value Default
uncheckedIcon Uncheked icon sate Drawable Heart Icon
checkedIcon Checked icon state Drawable Heart Icon
uncheckedIconTint Unchecked icon color Color #A1A1A1A1
checkedIconTint Checked icon color Color #FFFF0000
iconSize Size of icon, applied to both widht & height Dimension 55% of ExpressView
burstColor Color of line burst behind the icon Color #FFFF0000
setChecked Initial check state of icon Boolean false

Note:- Default ExpressView size is 48dp and iconSize is 26dp (55% of 48dp)

Public Kotlin/Java properties

Name Description Value Default
isChecked Initial check state of icon Boolean false
animationStartDelay Delay between the tap and animation, applied to both icon and burst animations Long 50L
iconAnimationDuration Animation duration of icon inside ExpressView Long 700L
burstAnimationDuration Animation duration of line burst behind the icon Long 500L
interpolator Animation interpolator for the icon inside ExpressView Interpolator BounceInterpolator
onCheckListener Check state change listener/callback OnCheckListener null

Версии библиотеки

Версия
0.0.3
0.0.2
0.0.1