I'm attempting to use rotate to give a view the semblance of shaking side to side. I've attempted to define the animation programmatically and am using animationset to loop it as suggested in this question. However on execute the code doesn't seem to be doing anything at all.
AnimationSet set = new AnimationSet(true);
RotateAnimation rotright = new RotateAnimation(0.0f, 20.0f,
Animation.RELATIVE_TO_SELF, 0.9f, Animation.RELATIVE_TO_SELF, 0.5f);
rotright.setDuration(0);
set.addAnimation(rotright);
RotateAnimation rotleft = new RotateAnimation(0.0f, 340.0f,
Animation.RELATIVE_TO_SELF, 0.9f, Animation.RELATIVE_TO_SELF, 0.5f);
rotleft.setDuration(0);
set.addAnimation(rotleft);
blender.startAnimation( set );
}
};
Any clues as to how exactly I've messed up would be greatly appreciated.