Skip to content

Instantly share code, notes, and snippets.

@wanabe
Created June 24, 2013 11:28
Show Gist options
  • Select an option

  • Save wanabe/5849395 to your computer and use it in GitHub Desktop.

Select an option

Save wanabe/5849395 to your computer and use it in GitHub Desktop.
class TextView < import("android/widget")
define_init "Landroid/content/Context;"
define :setText, "Ljava/lang/CharSequence;", "V"
end
class Mred < JavaMain
define :setContentView, "Landroid/view/View;", "V"
def initialize
textview = TextView.new(self)
textview.setText("hello from mruby")
setContentView(textview)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment