Created
July 11, 2017 05:49
-
-
Save codenameone/d21e57eb35d25a97705450c32fdee549 to your computer and use it in GitHub Desktop.
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
open 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