artsoft Active Member Licensed User Longtime User Sep 4, 2020 #1 Hi! Some years ago, I posted here a question regarding the removing of animation between 2 activities. Here was the solution: B4X: Sub SetNoAnimation() Private r As Reflector Try r.Target = r.GetActivity r.RunMethod4("overridePendingTransition", Array As Object(0, 0), Array As String("java.lang.int", "java.lang.int")) Catch ' any err catching... End Try End Sub Setting to 0 helped in my case ... I had a Samsung Galaxy S3 and Galaxy S6 Edge. Since Monday this week, I have now a a new ULEFONE Note P9 with Android 10. Very good smartphone ... very cheep with this data: 4 GB RAM, Android10, 32 GB SDD, Octa-Core and so on ...... You can see it here: Ulefone Note P9 So far so good. All my apps are running very well ... Performance is great. BUT: Although I switched off the animation between 2 Activities, every time I start an Activity, first a black screen is shown, then the Acitiviy is shown. When I finish the current Activity, the the previous activity is shown at once without a black screen. What should / can I do to avoid this effect?! On my Galaxies (see above) this effect is never visible. Thanks in advance. Regards ARTsoft
Hi! Some years ago, I posted here a question regarding the removing of animation between 2 activities. Here was the solution: B4X: Sub SetNoAnimation() Private r As Reflector Try r.Target = r.GetActivity r.RunMethod4("overridePendingTransition", Array As Object(0, 0), Array As String("java.lang.int", "java.lang.int")) Catch ' any err catching... End Try End Sub Setting to 0 helped in my case ... I had a Samsung Galaxy S3 and Galaxy S6 Edge. Since Monday this week, I have now a a new ULEFONE Note P9 with Android 10. Very good smartphone ... very cheep with this data: 4 GB RAM, Android10, 32 GB SDD, Octa-Core and so on ...... You can see it here: Ulefone Note P9 So far so good. All my apps are running very well ... Performance is great. BUT: Although I switched off the animation between 2 Activities, every time I start an Activity, first a black screen is shown, then the Acitiviy is shown. When I finish the current Activity, the the previous activity is shown at once without a black screen. What should / can I do to avoid this effect?! On my Galaxies (see above) this effect is never visible. Thanks in advance. Regards ARTsoft
Erel B4X founder Staff member Licensed User Longtime User Sep 6, 2020 #2 Make sure not to do too much things before you load the layout and if the layout is large, split it into several layouts and only load the layout that is actually needed when the activity starts. You can also change the activity background color: Theme Colors Upvote 0
Make sure not to do too much things before you load the layout and if the layout is large, split it into several layouts and only load the layout that is actually needed when the activity starts. You can also change the activity background color: Theme Colors