Android blog,Animation capability in Android and how to create them
نوشته شده توسط : dotnek

The addition of new features and capabilities increases the use of the operating system and improves their performance . For example, in version 3.0, the Android operating system supports dynamic views and has the ability to display them. As the version of operating systems increases, other new features are added to them. Dynamics allows users to easily identify object properties over specific time periods and modify them as needed. In this tutorial we will talk about different types of dynamic display capabilities in the Android operating system .The API allows the programmer to set a start value and an end value for the object properties at specified intervals, and can also apply timing changes to the attribute. It should be noted that this API can be used for different types of objects and is not intended only for views.The parent class, also known as the superclass, is also the Animation API of the Animator class. The ObjectAnimator class is used to define and modify the properties of objects.It is also possible for the programmer to add an AnimatorListener class to the Animator senior class. Listener can also be called in the animation and animation stages.

ViewPropertyAnimator

It should be noted that using the ViewPropertyAnimator class, which first appeared in version 3.1 of the Android operating system, can access the animations that exist at the view level.The ViewPropertyAnimator object in a view can be returned by the animate () function. This object can enable animations to be performed simultaneously. It also has an API that enables the programmer to set the animation time.The task of the ViewPropertyAnimator class is to provide an API for dynamic views.The code below shows its use.

// Using hardware layer
myView.animate (). translationX (400). withLayer ();
ViewPropertyAnimator can be enabled to use a hardware layout to optimize performance and improve performance.
// Using hardware layer
myView.animate (). translationX (400). withLayer ();
Runnable should be set directly so that it can run both at the beginning and end of the dynamic view.
// StartAction
MyView.animate (). TranslationX (100). withStartAction (new Runnable () {
Public void run () {
Viewer.setTranslationX (100-myView.getWidth ());
// do something
}
});
// EndAction
MyView.animate (). Alpha (0). withStartAction (new Runnable () {
Public void run () {
// Remove the view from the layout called parent
Parent.removeView (myView);
}
});

 

setInterpolator () allows you to create a TimeInterpolator object. The standard procedure in this section is linear. In this AccelerateDecelerateInterpolator, the speed is initially low and increases slightly in the middle and then decreases again at the end. 

 

Read more on:https://www.dotnek.com/Blog/Apps/animation-capability-in-android-and-how-to-cr

Link:https://dotnek.mystrikingly.com/

Related link:DotNek iOS Development





:: برچسب‌ها: dotnek , seo , site ,
:: بازدید از این مطلب : 86
|
امتیاز مطلب : 0
|
تعداد امتیازدهندگان : 0
|
مجموع امتیاز : 0
تاریخ انتشار : جمعه 15 مرداد 1400 | نظرات ()
مطالب مرتبط با این پست
لیست
می توانید دیدگاه خود را بنویسید


نام
آدرس ایمیل
وب سایت/بلاگ
:) :( ;) :D
;)) :X :? :P
:* =(( :O };-
:B /:) =DD :S
-) :-(( :-| :-))
نظر خصوصی

 کد را وارد نمایید:

آپلود عکس دلخواه: