我在使用TranslateAnimation的应用程序,但我想将TranslateAnimation反转到开始位置.
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.imageviewactivity);
TranslateAnimation toptranslateanimation = new TranslateAnimation(0, 0, tempBar,
scanner_image.getHeight() - 50);
toptranslateanimation.setDuration(4000);
toptranslateanimation.setAnimationListener(this);
scanning_bar.setAnimation(toptranslateanimation);
}
Run Code Online (Sandbox Code Playgroud)