Created
November 13, 2013 22:34
-
-
Save sgalles/7457741 to your computer and use it in GitHub Desktop.
Nothing more that a proof of concept, this is a basic Android activity written in Ceylon (uses the new syntax for Java interop static inner class/fields of Ceylon 1.0.0). Works with and Android SDK 19.
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
import android.app { Activity } | |
import android.os { Bundle } | |
import android.view { Menu } | |
import android.widget { TextView } | |
import java.lang { JString=String } | |
shared class Foo() extends Activity() { | |
shared actual void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.\Ilayout.activity_main); | |
assert (is TextView textView = findViewById(R.\Iid.foo)); | |
textView.text = JString("Hello World !"); | |
} | |
shared actual Boolean onCreateOptionsMenu(Menu menu) { | |
menuInflater.inflate(R.\Imenu.main, menu); | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment