This advanced feature allows you to make calls to the underlying Android APIs which can be useful if you find a feature is missing from DS. You need to look in the Android docs for that information.
For example this is the docs for an Android View (all DS controls are made from Android Views)
Here is an example of setting the view gravity if a text control using this method:-
txt.Method( "setGravity", "int", 16 /*CENTER_VERTICAL*/ )
Here is an example of creating a vertical SeekBar by using the Java setRotation method via reflection:-
function OnStart()
{
lay = app.CreateLayout( "Linear", "VCenter,FillXY" );
skb = app.CreateSeekBar( 0.4 );
skb.Method( "setRotation", "float", 270)
skb.SetRange( 1.0 );
skb.SetValue( 0.5 );
skb.SetOnTouch( skb_OnTouch );
lay.AddChild( skb );
app.AddLayout( lay );
}
function skb_OnTouch( value )
{
app.ShowPopup( "Value = " + value );
}
You can pass up to 4 parameters to .Method() , you need to pass a comma separated list of parameter types as the second parameter ( int, float, boolean, string )
For example:-
txt.Method( "someAndroidMethod", "int,string", 16, "hello" )