I’m trying to move an image back to its original position and then move it 200 pixels. Each line of this program works fine separately, but these two lines don’t work together.
When I use two lines like below, the image does not move and stays in place
binding.BannerUp.animate().translationY(0).setDuration(0);
binding.BannerUp.animate().translationY(200).setDuration(2000);
>Solution :
try this:
binding.BannerUp.setTranslationX(0);
binding.BannerUp.animate().translationY(200).setDuration(2000);