Created
February 22, 2012 20:53
-
-
Save hns/1887178 to your computer and use it in GitHub Desktop.
Native Android activity written in JavaScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# compile step for js activity - yes, this will be automated! | |
java -cp libs/js.jar:../android-sdk-linux/platforms/android-15/android.jar org.mozilla.javascript.tools.jsc.Main -o JsActivity -package org.jsdroid.demo -d out/production/jsdroid-demo/ -version 180 -extends android.app.Activity src/org/jsdroid/demo/JsActivity.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var {TextView} = Packages.android.widget; | |
function onCreate(savedState) { | |
this.super$onCreate(savedState); | |
var view = new TextView(this); | |
view.text = "Android ♥ Rhino"; | |
this.contentView = view; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment