Android Question Parallax effect on views for B4A (Just like B4i)

Carlos Huerta

Licensed User

First of all, I hope for anyone reading this they are doing very well. Please take care and remember to wash your hands! ❤

Now for my question: Is there any method to achieve the same parallax effect on views from B4i, in views on B4A?.

There is a method called "SetParallaxEffect(Vertical as int, Horizontal as int)" in the views on B4i, and this views move when the device is tilted. Is this possible in B4A?.

My last achievement was using SetLayout and SetLayoutAnimated to recreate this effect, using a timer and detecting the values of the accelerometer ( Using this thread made by Erel -> Orientation and Accelerometer ) but my implementation it's a bit sloppy (Not a fluid movement as I want to achieve).

Any ideas?.

Btw, thanks so much and please take care of your health!.

- Carlos

Carlos Huerta

Licensed User
The orientation based parallax effect is a native feature of iOS. There is no such native feature in Android.

I guess that with some work you should be able to create a similar effect based on the orientation sensor.

Ok! I got it!. I'm gonna try to recreate the effect and post my results in another thread. Thanks so much for your response!.
Upvote 0