Infairy platform define different layout object to let users interactive with bundle by graphic usere interface, each bundle can be put into many layout tag, each layout tag can design many layout object.
This chapter will show you how to ceate the layout HTML object:
First, you have to Field Layout class:
This chapter will show you how to ceate the layout HTML object:
import com.infairy.cocina.SDK.Layout.Layout; import com.infairy.cocina.SDK.Layout.LayoutHTML;Then, get Layout service
Layout layout=(Layout)Tools.getService(context, Layout.class.getName(), "(FUNCTION=LAYOUT)");Next, create layout tag and get LayoutID for other layout object used purpose:
LayoutTag ltag=new LayoutTag(); ltag.backgroundImage="img/background.png"; ltag.bundleID=BundleID; ltag.LayoutHeight=450; ltag.LayoutWidth=800; ltag.title="My App"; /* * Create layout tag and get layout id for other layout object use */ LayoutID=layout.createUI(this, ltag);Nex, create HTML layout object:
LayoutHTML lh=new LayoutHTML(); lh.LayoutID=LayoutID; lh.left=267; lh.top=57; lh.width=482; lh.height=283; lh.url="http://www.infairy.com/"; /* * Create HTML layout object */ layout.createUI(this, lh); lh=null;The HTML layout object properties show as below:
/** * layout id of bundle */ public String LayoutID=""; /** * layout width in pixel, default is 10 */ public int width=10; /** * layout height in pixel, default is 10 */ public int height=10; /** * layout axis of left, default is 0 */ public int left=0; /** * layout axis of top, default is 0 */ public int top=0; /** * url define */ public String url=""; /** * visibility, default is true */ public boolean visible=true; /** * Account */ public String Account=""; /** * Password */ public String Password="";