- Notifications
You must be signed in to change notification settings - Fork4
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
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
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.
dependencies { implementation"co.ankurg.expressview:expressview:0.0.3"}
<co.ankurg.expressview.ExpressViewandroid:id="@+id/likeButton"android:layout_width="64dp"android:layout_height="64dp" />
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") }})
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)
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 |
About
Let your users express more with this micro-interaction library to animate like, react, or other actions. ❤️
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published