This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyClass1{ | |
public MyClass2 mMC2; | |
public MyClass1(){ | |
mMC2.setOnAnimationEndedListener(new MyClass2.OnAnimationEndedListener() { | |
@Override | |
public void onAnimationEnded() { | |
Log.v("TAG", "onAnimationEndedListener"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create a GYROSCOPE SENSOR Listener | |
* Check for more info: http://developer.android.com/guide/topics/sensors/sensors_motion.html | |
*/ | |
private SensorManager mSensorService; | |
private Sensor mSensor; | |
private SensorEventListener mySensorEventListener; | |
mySensorEventListener = new SensorEventListener() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Object Animator Example | |
* Check for more info: http://developer.android.com/guide/topics/graphics/prop-animation.html | |
*/ | |
private Animator mMyAnimator; | |
private int mDuration = 3000; //Duration in millis | |
private MyObject object; | |
private float mInitialVal = 0.0f; | |
private float mInitialVal = 0.0f; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ValueAnimator can be type of: ofInt, ofFloat, ofObject, etc... | |
* Check for more info: http://developer.android.com/reference/android/animation/ValueAnimator.html | |
* and http://developer.android.com/guide/topics/graphics/prop-animation.html | |
*/ | |
public ValueAnimator va = ValueAnimator.ofInt(0, 300); | |
public int mDuration = 3000; //in millis | |
va.setDuration(mDuration); | |
va.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { | |
public void onAnimationUpdate(ValueAnimator animation) { |