material-components / material-components-android

Modular and customizable Material Design UI components for Android
Apache License 2.0
16.33k stars 3.06k forks source link

Documentation about CircularReveal components. #194

Closed agustinsivoplas closed 6 years ago

agustinsivoplas commented 6 years ago

How to create a circular reveal animation with this components?

android.support.design.circularreveal.CircularRevealFrameLayout
android.support.design.circularreveal.CircularRevealGridLayout
android.support.design.circularreveal.CircularRevealLinearLayout
android.support.design.circularreveal.CircularRevealRelativeLayout
android.support.design.circularreveal.cardview.CircularRevealCardView
android.support.design.circularreveal.coordinatorlayout.CircularRevealCoordinatorLayout

Please could you provide any documentation/example ?

Thanks in advance.

ldjcmu commented 6 years ago

Please take a look at the documentation on material-components-android/lib/java/com/google/android/material/circularreveal/CircularRevealWidget.java.

agustinsivoplas commented 6 years ago

@ldjcmu the documentation is not enough to understand how the components works. Also there is a stackoverflow question with same doubts https://stackoverflow.com/questions/51432581/circular-reveal-android-compat-with-design-library-28

ldjcmu commented 6 years ago

Sorry, I'll try to clarify a bit more.

The documentation for that java class states "To modify the circular clip, use {@link CircularRevealCompat}." CircularRevealCompat has methods with the signature 'Animator createCircularReveal(CircularRevealWidget ...)'. The classes you listed above (e.g., CircularRevealLinearLayout) implement CircularRevealWidget, so you can use those in the create call.

This call combined with android documentation on creating circular reveals (https://developer.android.com/training/animation/reveal-or-hide-view#Reveal) should get you what you need.

I hope that's a bit more clear.

agustinsivoplas commented 6 years ago

Is clear now. Thanks!