B4X Store

ELEVATEUI · B4A · XUI

FallingAnimation

Add a temporary falling-object effect for celebratory screens, not critical information.

78 modules 1,780 APIs

Effects & interface utilities

What it solves

Add a temporary falling-object effect for celebratory screens, not critical information.

Animated conceptual demonstration, not an exact Android control screenshot.

5 methods0 Designer0 events

When to use this module

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.

B4A integration examples

Tutorials are based on existing project examples or audited APIs. Check each example’s prerequisites; B4A compilation is not claimed.

Falling leaves controlled with two ElevateUI buttons
Reviewed integration tutorial ElevateUI(6).b4xlib: FallingAnimation.bas + UIButton.bas Not B4A-compiled

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

Public methods reference

5 audited signatures

Public Sub Initialize(Activity As B4XView)

Prepare the instance before its other methods.

Activity As B4XView
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.

Imagedir As StringImageName As StringWidth As IntHeight As Int
Sub Timer_FallingObjects_Tick

Use Timer_FallingObjects_Tick for its named operation; follow its exact signature.

Designer · 0

No custom Designer properties were found in the audited API.

Public events and how to implement them · 0

No public callback events are declared in the catalog. You can still handle B4A events for controls inserted inside it.

Source: ElevateUI public API catalog; tutorials cross-checked against ElevateUI(6).b4xlib. Visualizations are illustrative; sample code requires B4A compilation.