Jan 3, 2023 Replies: 12 PagesTransiiton Author: Solutions Development Version: 1.07 TransitionPage Constant AnimationBatMan AnimationColumn AnimationCircleExplode AnimationCircleImplode AnimationRotaded AnimationSpotted AnimationStrip AnimationZoom SlideFromLeft SlideFromTop SlideFromRight SlideFromBottom ShoveFromLeft ShoveFromTop ShoveFromRight ShoveFromBottom AnimationGuillotine Functions: Initialize (FromPageRoot As B4XView, ToPageRoot As B4XView) Initializes the object. You can add parameters to this method if needed. Transition (Animation As Int, Durate As Int) NOTE: Make sure that the base panel of each page has a color. If it's transparent it won't work properly. The root variable must be declared public Preferably the duration of the page animations is set to zero Log update (1.01) Add AnimationSpotted (1.02) Add SlideFromLeft, SlideFromTop, SlideFromRight, SlideFromBottom (1.03) Add AnimationLiquidUp, AnimationLiquidDown (1.04) Add AnimationBatMan (1.05) Add ShoveFromLeft, ShoveFromTop, ShoveFromRight, ShoveFromBottom (1.06) Fix ios Bug (1.07) Add AnimationGuillotine Attachments PagesTransiiton.b4xlib PagesTransiiton.b4xlib 4.3 KB · Views: 703 Last edited: Mar 27, 2023 Click to expand...
PagesTransiiton Author: Solutions Development Version: 1.07 TransitionPage Constant AnimationBatMan AnimationColumn AnimationCircleExplode AnimationCircleImplode AnimationRotaded AnimationSpotted AnimationStrip AnimationZoom SlideFromLeft SlideFromTop SlideFromRight SlideFromBottom ShoveFromLeft ShoveFromTop ShoveFromRight ShoveFromBottom AnimationGuillotine Functions: Initialize (FromPageRoot As B4XView, ToPageRoot As B4XView) Initializes the object. You can add parameters to this method if needed. Transition (Animation As Int, Durate As Int) NOTE: Make sure that the base panel of each page has a color. If it's transparent it won't work properly. The root variable must be declared public Preferably the duration of the page animations is set to zero Log update (1.01) Add AnimationSpotted (1.02) Add SlideFromLeft, SlideFromTop, SlideFromRight, SlideFromBottom (1.03) Add AnimationLiquidUp, AnimationLiquidDown (1.04) Add AnimationBatMan (1.05) Add ShoveFromLeft, ShoveFromTop, ShoveFromRight, ShoveFromBottom (1.06) Fix ios Bug (1.07) Add AnimationGuillotine
Solutions Development Member Licensed User Longtime User Jan 3, 2023 #2 If you initialize with B4X: Copy Private Sub Button1_Click Dim T As TransitionPage T.Initialize(Root,P2.Root) B4XPages.ShowPage("P2") T.Transition(T.AnimationSpotted,1000) End Sub Attachments Sample.zip Sample.zip 22.8 KB · Views: 639 Last edited: Jan 19, 2023
If you initialize with B4X: Copy Private Sub Button1_Click Dim T As TransitionPage T.Initialize(Root,P2.Root) B4XPages.ShowPage("P2") T.Transition(T.AnimationSpotted,1000) End Sub
Gianni M Well-Known Member Licensed User Longtime User Jan 3, 2023 #3 come al solito un plauso a @Star-Dust ?
mcqueccu Expert Licensed User Longtime User Jan 4, 2023 #4 Nice one. Can you implement the basic transitions like Slide Left, right, up and down?
Solutions Development Member Licensed User Longtime User Jan 12, 2023 #5 Update 1.04 Add AnimationBatMan Dedicated to Batman Fans Last edited: Jan 12, 2023
Olaan Expert Licensed User Longtime User Jan 18, 2023 #7 Solutions Development said: B4X: Copy Private Sub Button1_Click Dim T As TransitionPage T.Initialize(Root,P2.Root) T.Transition(T.AnimationSpotted,1000) B4XPages.ShowPage("P2") End Sub View attachment 137680 Click to expand... If the pages isn't created as B4XView,how to do? I always use StartActivity(Activity As Object) Code: Copy T.Initialize(Root,P2.Root) Last edited: Jan 18, 2023
Solutions Development said: B4X: Copy Private Sub Button1_Click Dim T As TransitionPage T.Initialize(Root,P2.Root) T.Transition(T.AnimationSpotted,1000) B4XPages.ShowPage("P2") End Sub View attachment 137680 Click to expand... If the pages isn't created as B4XView,how to do? I always use StartActivity(Activity As Object) Code: Copy T.Initialize(Root,P2.Root)
Solutions Development Member Licensed User Longtime User Jan 18, 2023 #8 Theera said: If the pages isn't created as B4XView,how to do? I always use StartActivity(Activity As Object) Code: Copy T.Initialize(Root,P2.Root) Click to expand... this library was created for B4XPages. If you want to use it for activities, perhaps you could use them if the two panels are anchored to the same base. You can set the starting panel and then the ending panel as parameters
Theera said: If the pages isn't created as B4XView,how to do? I always use StartActivity(Activity As Object) Code: Copy T.Initialize(Root,P2.Root) Click to expand... this library was created for B4XPages. If you want to use it for activities, perhaps you could use them if the two panels are anchored to the same base. You can set the starting panel and then the ending panel as parameters
tsteward Well-Known Member Licensed User Longtime User Jan 18, 2023 #9 I've taken the 3 page sample and changed to the way my app references various pages and attempted to apply this lib but I get the following error. Hoping someone can tell me what I have missed. Spoiler: Error Error occurred on line: 37 (TransitionPage) java.lang.RuntimeException: Object should first be initialized (B4XView). at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:67) at anywheresoftware.b4a.objects.B4XViewWrapper.asViewWrapper(B4XViewWrapper.java:91) at anywheresoftware.b4a.objects.B4XViewWrapper.Snapshot(B4XViewWrapper.java:345) at b4a.example.transitionpage._initialize(transitionpage.java:77) at b4a.example.b4xmainpage._btnlogin_click(b4xmainpage.java:117) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157) at anywheresoftware.b4a.BA.raiseEvent(BA.java:201) at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80) at android.view.View.performClick(View.java:7881) at android.widget.TextView.performClick(TextView.java:16201) at android.view.View.performClickInternal(View.java:7858) at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0) at android.view.View$PerformClick.run(View.java:30863) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8741) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) Attachments B4ATransTest.zip B4ATransTest.zip 14.4 KB · Views: 558
I've taken the 3 page sample and changed to the way my app references various pages and attempted to apply this lib but I get the following error. Hoping someone can tell me what I have missed. Spoiler: Error Error occurred on line: 37 (TransitionPage) java.lang.RuntimeException: Object should first be initialized (B4XView). at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:67) at anywheresoftware.b4a.objects.B4XViewWrapper.asViewWrapper(B4XViewWrapper.java:91) at anywheresoftware.b4a.objects.B4XViewWrapper.Snapshot(B4XViewWrapper.java:345) at b4a.example.transitionpage._initialize(transitionpage.java:77) at b4a.example.b4xmainpage._btnlogin_click(b4xmainpage.java:117) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157) at anywheresoftware.b4a.BA.raiseEvent(BA.java:201) at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80) at android.view.View.performClick(View.java:7881) at android.widget.TextView.performClick(TextView.java:16201) at android.view.View.performClickInternal(View.java:7858) at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0) at android.view.View$PerformClick.run(View.java:30863) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8741) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Solutions Development Member Licensed User Longtime User Jan 18, 2023 #10 tsteward said: Spoiler: Error Error occurred on line: 37 (TransitionPage) java.lang.RuntimeException: Object should first be initialized (B4XView). at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:67) at anywheresoftware.b4a.objects.B4XViewWrapper.asViewWrapper(B4XViewWrapper.java:91) at anywheresoftware.b4a.objects.B4XViewWrapper.Snapshot(B4XViewWrapper.java:345) at b4a.example.transitionpage._initialize(transitionpage.java:77) at b4a.example.b4xmainpage._btnlogin_click(b4xmainpage.java:117) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157) at anywheresoftware.b4a.BA.raiseEvent(BA.java:201) at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80) at android.view.View.performClick(View.java:7881) at android.widget.TextView.performClick(TextView.java:16201) at android.view.View.performClickInternal(View.java:7858) at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0) at android.view.View$PerformClick.run(View.java:30863) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8741) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) Click to expand... Preferably use B4XPages.AddPageAndCreate rather than B4XPages.AddPage But if you use AddPage you have to initialize after the show method like in this example B4X: Copy Dim T As TransitionPage T.Initialize(Root,Pages.Page2.Root) B4XPages.ShowPageAndRemovePreviousPages("Page 2") T.Transition(T.AnimationSpotted,1000) IMPORTANT the background of the pages must be colored Last edited: Jan 19, 2023
tsteward said: Spoiler: Error Error occurred on line: 37 (TransitionPage) java.lang.RuntimeException: Object should first be initialized (B4XView). at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:67) at anywheresoftware.b4a.objects.B4XViewWrapper.asViewWrapper(B4XViewWrapper.java:91) at anywheresoftware.b4a.objects.B4XViewWrapper.Snapshot(B4XViewWrapper.java:345) at b4a.example.transitionpage._initialize(transitionpage.java:77) at b4a.example.b4xmainpage._btnlogin_click(b4xmainpage.java:117) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157) at anywheresoftware.b4a.BA.raiseEvent(BA.java:201) at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80) at android.view.View.performClick(View.java:7881) at android.widget.TextView.performClick(TextView.java:16201) at android.view.View.performClickInternal(View.java:7858) at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0) at android.view.View$PerformClick.run(View.java:30863) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8741) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) Click to expand... Preferably use B4XPages.AddPageAndCreate rather than B4XPages.AddPage But if you use AddPage you have to initialize after the show method like in this example B4X: Copy Dim T As TransitionPage T.Initialize(Root,Pages.Page2.Root) B4XPages.ShowPageAndRemovePreviousPages("Page 2") T.Transition(T.AnimationSpotted,1000) IMPORTANT the background of the pages must be colored
Solutions Development Member Licensed User Longtime User Jan 19, 2023 #11 Update 1.05 Add ShoveFromLeft, ShoveFromTop, ShoveFromRight, ShoveFromBottom Unlike the slide method, it does not scroll over the previous page, but shoves the previous page which moves while the current page scrolls and takes its place.
Update 1.05 Add ShoveFromLeft, ShoveFromTop, ShoveFromRight, ShoveFromBottom Unlike the slide method, it does not scroll over the previous page, but shoves the previous page which moves while the current page scrolls and takes its place.
Solutions Development Member Licensed User Longtime User Jan 19, 2023 #12 Created an example of table strips with scrolling animation. (Requires version 1.06+) Attachments Sample2.zip Sample2.zip 133.4 KB · Views: 588 Last edited: Jan 20, 2023
Solutions Development Member Licensed User Longtime User Mar 27, 2023 #13 Update 1.07 Add AnimationGuillotine