Created
July 11, 2017 05:42
-
-
Save codenameone/9d1594b3d54a1e6258fdd28fb7b6ddd1 to your computer and use it in GitHub Desktop.
Kotlin Article Sample
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
public class MyApplication { | |
private Form current; | |
private Resources theme; | |
public void init(Object context) { | |
theme = UIManager.initFirstTheme("/theme"); | |
Toolbar.setGlobalToolbar(true); | |
Log.bindCrashProtection(true); | |
} | |
public void start() { | |
if(current != null){ | |
current.show(); | |
return; | |
} | |
Form hi = new Form("Hi World", BoxLayout.y()); | |
hi.add(new Label("Hi World")); | |
hi.show(); | |
} | |
public void stop() { | |
current = getCurrentForm(); | |
if(current instanceof Dialog) { | |
((Dialog)current).dispose(); | |
current = getCurrentForm(); | |
} | |
} | |
public void destroy() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment