I require an animation for an image in my application. The image should start coming from the top left corner till the middle of screen. The image size will be smaller at the initial stage. While coming to the middle of the screen, its size should increase(i.e. scaling should take place). Image should not go back to its original position. It should be placed at the middle of the screen itself after the animation.
Can anyone please help.
(Entry 1 of 7) 1 : an instrument or machine for weighing. 2a : a beam that is supported freely in the center and has two pans of equal weight suspended from its ends —usually used in plural. b : either pan or tray of a balance. scale.
Scale AI is the data platform for AI, providing high quality training data for leading machine learning teams.
Map scale refers to the relationship (or ratio) between distance on a map and the corresponding distance on the ground. For example, on a 1:100000 scale map, 1cm on the map equals 1km on the ground.
Please find the answer here. Create an xml inside /res/anim folder and put the below code into it.
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/linear_interpolator"> <scale android:fromXScale="0.0" android:fromYScale="0.0" android:toXScale="1.0" android:toYScale="1.0" android:duration="700" android:fillBefore="false" /> <translate android:fromXDelta="-200" android:fromYDelta="-200" android:duration="700" /> </set>
Place the below code inside the java file:
Animation logoMoveAnimation = AnimationUtils.loadAnimation(this, R.anim.logoanimation); logoIV.startAnimation(logoMoveAnimation);
logoanimation is the name of my animation xml file.
Thanks for all those who tried out for my question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With