'https://www.b4x.com/android/forum/threads/b4x-xui-simple-halo-animation.80267/#content
Private Sub RippleEffect (Parent As B4XView, Color As Int, Duration As Int)
Dim cvs As B4XCanvas
Dim p As B4XView = xui.CreatePanel("")
Dim InnerRadius As Int = Parent.Height * 1.30
If Parent.Width <> Parent.Height Then InnerRadius = Max(Parent.Width, Parent.Height) * 1.60
p.SetLayoutAnimated(0, 0, 0, InnerRadius, InnerRadius)
cvs.Initialize(p)
cvs.DrawCircle(cvs.TargetRect.CenterX, cvs.TargetRect.CenterY, cvs.TargetRect.Width / 2, Color, True, 0)
Dim bmp As B4XBitmap = cvs.CreateBitmap
p.RemoveViewFromParent
Dim iv As ImageView
iv.Initialize("")
Dim p As B4XView = iv
Dim Radius As Int = InnerRadius/2
Dim x As Int = Parent.Width/2
Dim y As Int = Parent.Height/2
p.SetBitmap(bmp)
Parent.AddView(p, x, y, 0, 0)
p.SetLayoutAnimated(Duration, x - Radius, y - Radius, Radius * 2, Radius * 2)
p.SetVisibleAnimated(Duration, False)
Sleep(Duration)
p.RemoveViewFromParent
End Sub