Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Let your users express more with this micro-interaction library to animate like, react, or other actions. ❤️

License

NotificationsYou must be signed in to change notification settings

ankurg22/ExpressView

Repository files navigation

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

PlatformAPITwitter

ExpressView sample gif

Gradle Dependency

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

XML

<co.ankurg.expressview.ExpressViewandroid: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.

importco.ankurg.expressview.OnCheckListener...likeButton.setOnCheckListener(object:OnCheckListener {overridefunonChecked(view:ExpressView?) {Log.d(TAG,"Checked")    }overridefunonUnChecked(view:ExpressView?) {Log.d(TAG,"Unchecked")    }})

Attributes

NameDescriptionValueDefault
uncheckedIconUncheked icon sateDrawableHeart Icon
checkedIconChecked icon stateDrawableHeart Icon
uncheckedIconTintUnchecked icon colorColor#A1A1A1A1
checkedIconTintChecked icon colorColor#FFFF0000
iconSizeSize of icon, applied to both widht & heightDimension55% of ExpressView
burstColorColor of line burst behind the iconColor#FFFF0000
setCheckedInitial check state of iconBooleanfalse

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

Public Kotlin/Java properties

NameDescriptionValueDefault
isCheckedInitial check state of iconBooleanfalse
animationStartDelayDelay between the tap and animation, applied to both icon and burst animationsLong50L
iconAnimationDurationAnimation duration of icon inside ExpressViewLong700L
burstAnimationDurationAnimation duration of line burst behind the iconLong500L
interpolatorAnimation interpolator for the icon inside ExpressViewInterpolatorBounceInterpolator
onCheckListenerCheck state change listener/callbackOnCheckListenernull

About

Let your users express more with this micro-interaction library to animate like, react, or other actions. ❤️

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp