I am trying to offset a fragment in Android. The transition and gliding movement work as expected, it glides exactly where I want. But before the presentation is in place, there is a white background where the view will be in the final position. It is like he was given space. But I want it to slide over my current views, so the white background is not shown. Any ideas on this? I am using a view animator with an xml file in res / anim.
Here is a little code:
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" > <translate android:duration="100" android:fromYDelta="100%" android:toYDelta="0" /> <alpha android:duration="100" android:fromAlpha="0.0" android:toAlpha="1.0" />
android.support.v4.app.FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction(); fragmentTransaction.setCustomAnimations(R.anim.slide_in_down, 0); fragmentTransaction.show(fragmentToSlideIn); fragmentTransaction.commit();
So, why is there a white background in the final position of the view before it reaches that position?
source share