-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibility to add custom element. #2
Comments
Thanks for reaching out to me with your input, and that's a great inquiry
too! I've thought of different ways to support different animations with
this library, but haven't tried or tested any of them though.
Here's an idea, I haven't tested this at all but I think it could work:
I've seen some pretty cool and pretty complex animations done using
Drawables that implement the Animatable interface before. You may be able
to write your animation in a subclass of Drawable, which has the ability to
draw to a Canvas using Canvas APIs, that implements Animatable, and then
use the Drawable#draw(Canvas) method to draw/start your animation.
Hopefully that's a good suggestion and pretty helpful lol! Let me know what
your thoughts and opinions are!!
…On Wed, Jan 10, 2018 at 1:33 PM, Mojtaba Solooki ***@***.***> wrote:
I was checking out the library it's good but i have a special inquiry that
i don't know there is a way to have it or not. I am trying to have a lottie
animation for loading but as far as i understood the way to have a custom
view is to use canvas which doesn't seems to be able to draw a custom
element. Do you have any suggestion on this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AKudCQPF-MmcQR25eA6owN4rfNJu3AGkks5tJQJigaJpZM4RZwdW>
.
|
Thanks for the response. I have seen the mentioned API as you said and would work good for some situations. But if there was a way to render a ViewGroup as a state on future versions it would give a lot of freedom not only on animation but on the other customization parts too. Lottie offers many great features on animationing plus it has a great library of premade animations that i didn't find something compared to it in android. (www.lottiefiles.com) |
I'll definitely be able to check that out within the next day or two. I
would like the library to be able to support complex animations so that
they're easy to make/implement!
Could you elaborate more on what you mean to render a view as a state? I
think I know what you mean, but I just want to make sure I'm on the right
page and completely understand.
On Jan 10, 2018 2:39 PM, "Mojtaba Solooki" <[email protected]> wrote:
Thanks for the response. I have seen the mentioned API as you said and
would work good for some situations. But if there was a way to render a
view as a state on future versions it would give a lot of freedom not only
on animation but on the other customization parts too. Lottie offers many
great features on animationing plus it has a great library of premade
animations that i didn't find something compared to it in android. (
www.lottiefiles.com)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKudCe69v8Vi3dMiv8JIuhJv2s4S5yrdks5tJRH4gaJpZM4RZwdW>
.
|
Canvas is the api to draw on a view but i'm thinking instead of we could have different views for each state then we would have the freedom to create any kind of layout we want to. I don't think it would be that hard. only another constructor for AbstractStateDisplay that draws the returned View for the state would be good. I appreciate your work and hope you the best. |
I was checking out the library it's good but i have a special inquiry that i don't know there is a way to have it or not. I am trying to have a lottie animation for loading but as far as i understood the way to have a custom view is to use canvas which doesn't seems to be able to draw a custom element. Do you have any suggestion on this?
The text was updated successfully, but these errors were encountered: