Ich werde nicht viel Unsinn sagen, zeigen wir Ihnen die Renderings:
Dies ist der Effekt unter iOS und ist unter Android völlig konsistent. Durch die DO_gestureView-Komponente und die DO_Animation-Komponente kann DeviceOne problemlos komplexe plattformübergreifende reine native Animationseffekte erzielen. Dieses Beispiel besteht darin, die Aufwärts- und Abwärtsanimation des Bildes durch Gesten zu steuern, um den Öffnungs- und Schließeffekt zu erzielen und auch Soundeffekte zu unterstützen.
Unten ist der Hauptcode
//index.ui.jsvar do_Animator1 = mm("do_Animator");do_Animator1.append(500, {y: -1334,curve:"Linear"});var do_Animator2 = mm("do_Animator");do_Animator2.append(500, {y: 0, Kurve: "linear"}); do_page.on ("NextPaGemoveing", function () {currentView = json_define [currentIndex] .view; currentIndex ++; if (currentIndex> = json_define.Length) currentIndex = 0; nextView = json_defex]. i = 0; i <json_define.length; ++ i) {if (json_define [i] .view! = currentView && json_define [i] .view! = = = = = = = = = NextView) {JSON_DEFINE [i] .view.visible = false;} else {json_define [i] .view.visible = true;}} currentView.fire ("closingBottom", "NextPagEmove"); "NextPagemoved");}); do_page.on ("NextPagemoved", function () {currentView.y = 0; nextView.y = 1332; do_alayout_main.y = 0; do_alayout_main.redraw (); do_alayout_main.animate (do_animator1, do_animator1, function () {nextView.fire ("öffnen");});}); do_page.on ("prepaGemoveing", function () {currentView = json_define [currentIndex] .view; currentIndex-; if (currentIndex <0) currentIndex = json_Define.Length.Length. Länge.Length. Länge.Lengths.Length. Länge -1; nextView = json_define [currentIndex] .view; currentView.fire ("schließen", "prepageMove");}); do_page.on ("prepaGemove", function () {nextView.fire ("initmoving", "prepagemoved"); i = 0; i <json_define.length; ++ i) {if (json_define [i] .view! = currentView && json_define [i] .view! = nextView) {json_define [i] .view.visible = false;} elsed {json_define [i]. 1332; nextView.y = 0; do_alayout_main.y = -1334; do_alayout_main.redraw (); do_alayout_main.Animate (do_animator2, function () {nextView.fire ("Öffnung");});});