I am new to android.I need to know the Basic Animation in Android for View\'s and View Group\'s.Can anyone give some Guide lines to learn it !!! Thanks in advance...
for future visitors i guess you need to try this nineoldandroids android animation
its so simple to use. dont forget to read the docs.
download the zip, use the src copy to your main folder src folder, or you can make a jar file out of it, or make it a library .. as for me I copied the src to my src.
package com.example.titleanimation;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.widget.ImageView;
import static com.nineoldandroids.view.ViewPropertyAnimator.animate;
public class MainActivity extends Activity {
private ImageView image;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
image = (ImageView) findViewById(R.id.imageView1);
/*
to do it like this you need to add import
import static com.nineoldandroids.view.ViewPropertyAnimator.animate;
*/
animate(image).setDuration(10000).rotationBy(360);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
happy coding ^^ NOTE : i tried Tween Engine by Aurielien Ribbon but theres a problem with API 8 , views dont have setX and setY.
best regards, Dave
You could start by reading the official guide to animations