I have a relative layout in which I created a CardView which is half in width of its parent. I just want to move CardView to the end of it's parent with animation. Here is my code:
TranslateAnimation animation = new TranslateAnimation(0, 180, 0, 0);
animation.setDuration(600);
animation.setFillAfter(true);
backCard.startAnimation(animation);
This code is working perfectly on some of screens but not on others. Is there any way to move cardview to the end of it's parent relative layout with animation?