Public Sub Initialize(Activity As B4XView)
Prepare the instance before its other methods.
ELEVATEUI · B4A · XUI
Add a temporary falling-object effect for celebratory screens, not critical information.
Effects & interface utilities
Add a temporary falling-object effect for celebratory screens, not critical information.
Animated conceptual demonstration, not an exact Android control screenshot.
Celebrate the end of a completed workflow with short-lived confetti, for example after finishing a registration.
Before integrating, examine its methods, events and Designer options.
Tutorials are based on existing project examples or audited APIs. Check each example’s prerequisites; B4A compilation is not claimed.
B4A Activity with ElevateUI and XUI enabled. Add leaf.png and confetti.png to the B4A Files tab. FallingAnimation overlays the Activity; UIButton creates its own view through AddToParent.
' B4A Main Activity: FallingAnimation + two ElevateUI UIButton controls
' Required assets in Files: leaf.png, confetti.png
Sub Process_Globals
End Sub
Sub Globals
Private Falling As FallingAnimation
Private btnStart As UIButton
Private btnStop As UIButton
Private running As Boolean
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.Color = Colors.RGB(245, 248, 252)
btnStart.Initialize(Me, "btnStart")
btnStart.AddToParent(Activity, 12dip, 12dip, 150dip, 48dip, _
1, 15, "Start falling", Colors.White, _
0xFF35B998, 0xFF21846D, "LEFT_RIGHT", 12dip)
btnStop.Initialize(Me, "btnStop")
btnStop.AddToParent(Activity, 170dip, 12dip, 110dip, 48dip, _
1, 15, "Stop", Colors.White, _
0xFF3478C8, 0xFF225A98, "LEFT_RIGHT", 12dip)
Falling.Initialize(Activity)
Falling.AddImage(File.DirAssets, "leaf.png", 24dip, 24dip)
Falling.AddImage(File.DirAssets, "confetti.png", 18dip, 18dip)
running = False
End Sub
Private Sub btnStart_Click
Falling.StartAnimation
running = True
End Sub
Private Sub btnStop_Click
Falling.StopAnimation
running = False
End Sub
Sub Activity_Pause(UserClosed As Boolean)
Falling.StopAnimation
End Sub
Sub Activity_Resume
If running Then Falling.StartAnimation
End Sub
5 audited signatures
Public Sub Initialize(Activity As B4XView)
Prepare the instance before its other methods.
Public Sub StartAnimation
Use StartAnimation for its named operation; follow its exact signature.
Public Sub StopAnimation
Use StopAnimation for its named operation; follow its exact signature.
Public Sub AddImage(Imagedir As String,ImageName As String, Width As Int, Height As Int)
Use AddImage for its named operation; follow its exact signature.
Sub Timer_FallingObjects_Tick
Use Timer_FallingObjects_Tick for its named operation; follow its exact signature.
No custom Designer properties were found in the audited API.
No public callback events are declared in the catalog. You can still handle B4A events for controls inserted inside it.