Aditya94A/Morphing-Material-Dialogs

Color chooser dialog support?

Closed this issue · 1 comments

I managed to rebuild your standalone morphing dialog to my liking, however I found out the creator of MaterialDialogs also has a color picker dialog which I would like to use morphingly as well. However, upon inspection of the code he appears to use a fragment and the standard android Dialog system for this. We cannot simply "getView()" and put it inside the morphing activity. Any ideas of how to manage to do this?

I reckon there's about 3 ways to do this.

  • Abandon activity/fragment plumbing altogether and just mold the animation to work with two Views, this would require recreating the color chooser dialog as a standalone view and decoupling it from it's current fragment/Dialog. Then it's mostly a matter of doing the circular reveal + arc animation from a FABs position to the color dialog's final dimensions.
  • Recreate the color picker without fragment (most likely as a compound view) such that getView() does work (i.e. using a similar format as to what the library's MorphDialogActivity does for plain MaterialDialog)
  • I haven't looked into this one, but if shared element transitions for fragments work in a manner similar to activities, then simply hooking up the shared element transition animation to the color chooser dialog fragment could be the easiest way to do this.