Widespread Augmented Reality

Widespread Augmented Reality
Click on the image to get the Android Augmented Reality Heads up Display

Tuesday, April 28, 2015

Android Shapes and Animation with XML

Here is the Java code in the main activity that animates using the XML below.

//main_activity.java
... Animation rising =AnimationUtils.loadAnimation(this,R.anim.rising);
ImageView bubble = (ImageView)findViewById(R.id.animatedFrame2);
bubble.startAnimation(rising); ...
//end of main_activity.java

anim/rising.xml

drawable-hdpi/bubble.xml

layout/main_activity.xml

No comments:

Post a Comment