ParallaxBackground class makes it simple to create a multilayer background.
The image files should be organized like this, where 0 is the top layer.
The code is very simple:
B4X:
Parallax.Initialize(Me, "layer", "png", 7) 'file names and count
Public Sub Tick (GS As X2GameStep)
HandleKeys
Parallax.Tick(GS)
End Sub
Public Sub DrawingComplete
Parallax.DrawComplete
End Sub