I want to replace a fragment with animation but it has to be dynamic every time, i.e. it will start from the point where I will click on the screen but fragmentTransaction.setCustomAnimations
method uses the predefined animation defined in anim folder like this:
fragmentTransaction.setCustomAnimations(R.anim.bounce, R.anim.bounce);
I create object of ScaleAnimation
to meet my need like this:
ScaleAnimation animation = new ScaleAnimation(fromX,ToX,fromY,toY,pivitX,pivotY);
animation.setDuration(500);
fragmentTransaction.setCustomAnimations
method does not accept scaleAnimation
it only accepts int. So how to attain dynamic animation while replacing fragment.