Skip to content

A convenience library to handle reversible AnimatedVectorDrawables

License

Notifications You must be signed in to change notification settings

akaita/MorphView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MorphView

A convenience library for reversible AnimatedVectorDrawables

Structure

  • example-kotlin and example-java are companions of the Android recipe: The easy path to animated icons bog post. They contain examples completely uncoupled from the MorphView library
  • example-library shows how to use the MorphView library.
  • library contains the MorphView library itself

Usage

implementation 'com.akaita.android:morphview:1.0.0' 
<com.akaita.android.morphview.MorphView
    android:id="@+id/morphView"
    android:layout_width="100dp"
    android:layout_height="100dp"
    app:avdFirst="@drawable/avd_favorite_to_send"
    app:avdSecond="@drawable/avd_send_to_favorite" />
override fun onResume() {
    favoriteButton.setOnClickListener { morphView.showAvdFirst() }
    toggleButton.setOnClickListener { morphView.morph() }
    sendButton.setOnClickListener { morphView.showAvdSecond() }
}

About

A convenience library to handle reversible AnimatedVectorDrawables

Resources

License

Stars

Watchers

Forks

Packages

No packages published