How to create rounded corner frame layout

188 views
Skip to first unread message

Syed Munawer Hassan

unread,
Sep 9, 2019, 5:52:28 PM9/9/19
to DroidScript
How to create rounded corner frame layout

Symbroson

unread,
Sep 9, 2019, 7:30:43 PM9/9/19
to DroidScript
You can use buttons as background:


function OnStart() {
    lay
= app.CreateLayout( "linear", "VCenter,fillxy" );    
    lay
.SetBackColor("white")
   
    lay2
= app.CreateLayout("absolute");
    lay2
.SetPadding(.05, .05, .05, .05)
    lay2
.SetSize(.9, .3);
    lay
.AddChild(lay2);
   
    btnBck
= app.CreateButton("", -1, -1, "FillXY,custom");
    btnBck
.SetStyle("#333333", "#555588", 10, 0, 0, .9)
    lay2
.AddChild(btnBck);
   
    lay3
= app.CreateLayout("linear", "fillXY");
    lay3
.SetPadding(.02, .005, .02, .015);
    lay2
.AddChild(lay3);
     
    app
.AddLayout( lay );
}


Syed Munawer Hassan

unread,
Sep 24, 2019, 2:31:18 AM9/24/19
to DroidScript
It is creating button rather than frame layout

Steve Garman

unread,
Sep 24, 2019, 5:15:02 AM9/24/19
to DroidScript
The easiest way is to create an image with a transparent background and the rounded corner design you want and set it as the background of the layout.

Reply all
Reply to author
Forward
0 new messages