I am trying to add a transition between activitis, but is not working.

I have been looking here and fix it, but none of the answers worked for me.

Like :

overridePendingTransition not working

Can I change the Android startActivity() transition animation?

Make new activity appear behind old one during transition

I post my code:

In my MainActivity with one button i set the onclick listener.

    cobrar.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            Intent formasdepago = new Intent(MainActivity.this, Formas_De_Pago.class);
            startActivity(formasdepago);
            overridePendingTransition(R.anim.push_in,R.anim.push_out);
        }
    });

Push_in.xml

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/linear_interpolator">
<translate android:fromYDelta="100%p" android:toYDelta="0" android:duration="500"/> </set>

Push_out.xml

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/linear_interpolator">
<translate android:fromYDelta="0" android:toYDelta="-100%p" android:duration="500"/> </set>

有帮助吗?

解决方案

The problem was my phone, I had disable this option:

Settings->Developer options -> Transition animation scale

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top