User Tools

Site Tools


playground:mynewtest

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

playground:mynewtest [2016/10/13 13:31]
62.244.61.30 just test
playground:mynewtest [2016/10/13 21:38]
Line 1: Line 1:
-This is about doing something 
-test 
-<code> 
-function OnStart()  
  
- 
-    var appjs='<script src="file:///android_asset/app.js"></script>'; 
- 
-    // note the backslashes escaping the single quotes below 
-    var myjs = '<script type="text/javascript"> function myboo(id){ app.Execute("b_test(\'" + id + "\')")}</script>'  
- 
- 
-    lay = app.CreateLayout("linear", "VCenter,FillXY");      
- 
-    web = app.CreateWebView(0.8, 0.8);    
-   
-    lay.AddChild(web);  
-    app.AddLayout(lay);  
- 
-    var b1 = "<button id= 'boo' onclick=myboo(id)>say boo</button>"; 
-    var b2 = "<button id='bah' onclick=myboo(id)>say bah</button>";  
- 
-    web.LoadHtml(appjs + myjs + b1 + b2); 
- 
-     
- 
- 
- 
-function b_test(x) { app.ShowPopup(x); };  
- 
-<\code> 
playground/mynewtest.txt · Last modified: 2016/10/13 21:38 (external edit)