Ripple objects using the CreateRippleLayout method of the Support object:
sup.CreateRippleLayout( options );
Options: FillX, FillY, FillXY, Center
Example - Simple
app.LoadPlugin( "Support" );
function OnStart()
{
lay = app.CreateLayout( "Linear", "VCenter,FillXY" );
sup = app.CreateSupport();
rpl = sup.CreateRippleLayout();
rpl.SetRippleOverlay( true );
rpl.SetRippleColor( "#FFFFFF" );
btn = app.CreateButton( "Hello World" );
rpl.AddChild( btn );
lay.AddChild( rpl );
app.AddLayout( lay );
}
sup.SetRipple( object, overlay, radius, color );
not: match - btn.SetRipple( overlay, radius, color );
Example - Set Ripple
app.LoadPlugin( "Support" );
function OnStart()
{
lay = app.CreateLayout( "Linear", "VCenter,FillXY" );
sup = app.CreateSupport();
btn = app.CreateButton( "HELLO", 0.2, 0.1 );
btn.SetBackColor( color.TRANS );
lay.AddChild( btn );
sup.SetRipple( btn, true, 20, "#FFFFFF" );
// match: btn.SetRipple( true, 20, "#FFFFFF" );
app.AddLayout( lay );
}
The following methods are available on the Ripple object:
GetType()
SetRippleOverlay( boolean )
SetRippleColor( color )
SetRippleRadius( number )
SetRippleBackColor( color )
AddChild( child )
Other Methods:
Show Other Methods
Material Ripple library developed by Balys Valentukevicius, licensed under the Apache 2.0 License. go github page