0
showaction = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f,
             Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF,
             -1.0f, Animation.RELATIVE_TO_SELF, 0.0f);
             showaction.setDuration(500);

这个方法参数效果是垂直向下滑动,现在我想改变它从左到右滑动。怎么做?

4

1 回答 1

0
showaction = new TranslateAnimation(Animation.RELATIVE_TO_SELF, -1.0f,
             Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF,
             0.0f, Animation.RELATIVE_TO_SELF, 0.0f);
             showaction.setDuration(500);

文档

于 2012-12-19T08:10:33.880 回答