【发布时间】:2017-08-02 23:32:46
【问题描述】:
我正在开发使用 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);
}
【问题讨论】:
-
它对我有用检查这个链接stackoverflow.com/questions/7281276/…
标签: android translate-animation