how do you implement custom animations?
I want to tell you nobody can come up with this stuff off the top of their head , if anybody claims that they can, they are lying to you unless you just finished implementing something that is entirely related to this question.
you're not going to be able to hit all the points
the first thing you feel is a deep sinking feeling in your heart, you're not sure what do they want me to say to describe the whole process to describe how I Implement them
let's find out what is required here.
first of all, show the classes' name you're going to use. Android provides several classes, there's the value animator object, animator and AnimatorSet.
you don't really need to go into them, just mention that you know them that's amazing.
but it's not amazing enough if you just stop right there, you're going to say you need to choose the right class for the right job you need to know what you need.
like I want to animate the position of an object, the size, the color.
these are all high level talk it's not implementation stuff.
you would say I would create the animation object given the properties and the duration how long I would animate it for, then I would call start() to start the animation
easy, then you would probably need to add an animator listener to be notified of what happens during the animation. like it start, it is cannceled, it is ended.
you need to override all of these methods ,you add your custom code here. where you need it you can customize
your can add an interpolator, indicate how an animation changes over time for example
you can also just use the View Property animator because in the end you are animating properties of a view this is a very direct simple easy to use API
you may be wondering I said in the beginning that no one can come up with the stuff off the top of their head, how did I do it I Googled it that's what I did, and to study for this stuff you have to Google it you have to memorize them
I hope they can serve as a reference for you when you are studying for something like this.
大體思路是:問到大致的問題缩膝, 作為一個普通開發(fā)者來說茄螃, 不可能一上來就能說的面面俱到浸赫, 除非是剛好這幾天寫過這個功能∪故浚回答可以先回答要完成這個功能, android都提供了哪幾個相關(guān)的類。 之后把相關(guān)類的大致用法給說明下测秸。提一句 I should give the properties by google it.
如果趕上自己正好了解的知識點, 就說的詳細(xì)些, 如果確實了解的不多霎冯, 就說個大概铃拇, 至于詳細(xì)的類屬性和該調(diào)用什么方法, 就直接說I will google it.