The settings involved in this section is only applicable for entering and exiting from animation, not for the cross-page jumping in the mini program.
The settings involved in this section is only applicable for entering and exiting from animation, not for the cross-page jumping in the mini program.
Enable the function of entering and exiting from animation
Add the parameter needAnimInTiny after starting the Mini Program, and set the value as true. For example:
Bundle bundle = new Bundle();
bundle.putBoolean("needAnimInTiny", true);
MPNebula.startApp("2018080616290001", bundle);
Set animation entrance
Add the animation resource files (tiny_fading_out.xml and tiny_push_up_in.xml) in the main project.
tiny_fading_out.xml:<?xml version="1.0" encoding="utf-8"?> <!--tiny_fading_out.xml--> <set xmlns:android="http://schemas.android.com/apk/res/android" android:duration="300"> <translate android:fromYDelta="0%" android:toYDelta="100%" /> </set>tiny_push_up_in.xml:<?xml version="1.0" encoding="utf-8"?> <!--tiny_push_up_in.xml--> <set xmlns:android="http://schemas.android.com/apk/res/android" android:duration="300"> <translate android:fromYDelta="100%" android:toYDelta="0%" /> </set>
Set animation exit
Add the animation resource files (tiny_fading_in.xml and tiny_push_down_out.xml) in the main project.
tiny_fading_in.xml:<?xml version="1.0" encoding="utf-8"?> <!--tiny_fading_in.xml--> <set xmlns:android="http://schemas.android.com/apk/res/android" android:duration="300"> <translate android:fromYDelta="100%" android:toYDelta="0%" /> </set>tiny_push_down_out.xml:<?xml version="1.0" encoding="utf-8"?> <!--tiny_push_down_out.xml--> <set xmlns:android="http://schemas.android.com/apk/res/android" android:duration="300"> <translate android:fromYDelta="0%" android:toYDelta="100%" /> </set>