B4A Class RippleButton Class

Hi All,

This custom view class will act as a button with ripple effect when clicked, it also has water effect if you swipe/move the pointer onto the view.
This class was inspired by SwiftButton (Part of XUI Views) and also advice from this post to make the code more customizable properties.

Since i don't have B4I installed on my PC the class not tested for iOS.

This class require additional library:
- XUI (2.00)
- B4A - BitmapCreator (4.73)
- B4J - jBitmapCreator (4.73)

rbb4a.gif
rbb4j.gif


*It's better and smoother when run on real device

I hope everyone find it useful.

Version History:

+ v0.3
  • add Divider Color property
  • add Divider Size property
  • add Ripple Duration property
  • add Water Effect Duration property
  • fix default icon width
+ v0.2
  • Add SetVisible method
  • Add SetEnabled method
+ v0.1
  • Initial Release
 

Attachments

  • RippleButton.zip
    22.9 KB · Views: 419
  • RippleButton.bas
    18.8 KB · Views: 365
Last edited:

rraswisak

Active Member
Licensed User
version update v0.3:
  • add Divider Color property
  • add Divider Size property
  • add Ripple Duration property
  • add Water Effect Duration property
  • fix default icon width
Please replace RippleButton.bas in the sample zip file with newly one class in first post.
Open designer and click every RippleButton view to update the properties list.
 
Top