Last active
July 11, 2017 05:47
-
-
Save codenameone/90078170dcd22b401ab3494a4773af34 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class MyApplication { | |
private var current: Form? = null | |
private var theme: Resources? = null | |
fun init(context: Any) { | |
theme = UIManager.initFirstTheme("/theme") | |
Toolbar.setGlobalToolbar(true) | |
Log.bindCrashProtection(true) | |
} | |
fun start() { | |
if (current != null) { | |
current!!.show() | |
return | |
} | |
val hi = Form("Hi World", BoxLayout.y()) | |
hi.add(Label("Hi World")) | |
hi.show() | |
} | |
fun stop() { | |
current = getCurrentForm() | |
if (current is Dialog) { | |
(current as Dialog).dispose() | |
current = getCurrentForm() | |
} | |
} | |
fun destroy() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment