user1101543
user1101543

Reputation: 13

Android Animation make sure the image not back?

TranslateAnimation: I want to move a Image, but do not want it to get back to its starting position. Can anyone help me? I am using another TranslateAnimation, but it's not working, so it's not working.

Upvotes: 0

Views: 178

Answers (2)

0xC0DED00D
0xC0DED00D

Reputation: 20348

use the following method:-

anime.setFillAfter(true);

where anime is the object of TranslateAnimation Class.

Upvotes: 1

Simon
Simon

Reputation: 14472

By default, Android will animate your view then go back to where it started.

See here and look at "fillAfter"

Upvotes: 1

Related Questions