问题
i am trying to implement slide in slide out animation for fragments. animation is working fine but it shows some white color layout in between how can i hide or remove that?
i referred to this post, but don't know exactly what has to be done Android - Making translations and objectAnimator on the same XML file
my slide-in-left.xml
<set xmlns:android="http://schemas.android.com/apk/res/android" >
<objectAnimator
xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="500"
android:propertyName="x"
android:valueFrom="1000"
android:valueTo="0"
android:valueType="floatType" />
</set>
calling like this in my fragment
transaction.setCustomAnimations(R.anim.slide_in_left, R.anim.slide_out_right,
R.anim.slide_in_right, R.anim.slide_out_left
);
any help will be really appreciated
回答1:
After Hours of searching and debugging...i finally found the answer!
you need to create your own custom class which extends framelayout and apply properties:) hope it helps some one!
来源:https://stackoverflow.com/questions/25339014/objectanimator-shows-white-background-for-fragments-in-android