Running Zebra Sample application
After building zebra to the GDP mentors asked me to develop some test app for zebra. Since there is no HTTP server in the GDP (https://at.projects.genivi. org/jira/browse/GDP-709) mentors asked me to run and test this inside my pc.
This is a sample application which draw a canvas in HTML 5.
First clone the repository
git clone https://github.com/akilawickey/zebra.git
Then
npm install
Then start http server using
gulp http
Then navigate to the the link http://localhost:8090 on your browser
you can see test.html inside the gui then run it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | <!DOCTYPE html> <html> <head> <!-- Zebra Sample application --> <script src='http://repo.zebkit.org/latest/zebra.min.js' type='text/javascript'> </script> <script type="text/javascript"> zebra.ready(function() { // import all classes, functions, constants // from zebra.ui, zebra.layout packages eval(zebra.Import("ui", "layout")); // create canvas var root = (new zCanvas(400, 400)).root; root.properties({ layout : new BorderLayout(8,8), border : new Border(), padding: 8, kids: { CENTER: new TextField("GENIVI Development Platform\n", true), BOTTOM: new Button("Clear").properties({ canHaveFocus: false }) }, }); root.find("//zebra.ui.Button").bind(function() { root.find("//zebra.ui.TextField").setValue(""); }); }); </script> </head> <body></body> </html> |
Here is the output of the sample application on my browser.
|
Comments
Post a Comment
Comment