Layout and Contents names #5
JoseskVolpe
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just for me to don't forget lol
Layout on Pixely Vulpine is a Context in Android
Content on Pixely Vulpine is a View in Android
And, of course, MIDlet in J2ME is a Activity in Android.... Here's another differences between their limitations... Both Android and J2ME allows to change between Activity/MIDlet programatically, however, J2ME uses a optional package for that, wich means it's not 100% compatible with all devices. Maybe i'll search a workaround for that by simulating a MIDlet inside another MIDlet, however, that could make Pixely Vulpine don't work as i expect... The developer would like to create an empty project from scratch with Pixely Vulpine as a library and use startApp(), pauseApp() and destroyApp() methods. That would make it impossible.
That wouldn't be so much a useful feature tho, as the developer could just use Layout (Context) to change between screens. So i'll leave this one alone and as a developer's decision wether they'll use a optional package to change MIDlets or not.
I might rename them soon. Layout to Context, and Content to View. I would like to make Pixely Vulpine familiar to Android developers, aswell easy to implement in native legacy J2ME API. Basically, familiar to both J2ME and Android developers.
As you can see, Layout is basically a javax.microedition.lcdui.Canvas wich you could just use Display.getDisplay(midlet).setCurrent(Layout) to change between screens, or use ContextWrapper.attachBaseContext(Layout) for that. However, both of these will throw an error, as using native J2ME API would not initialize the dedicated paint Thread and ContextWrapper has not been implemented yet. Currently, you can only use Layout.setCurrent(layout). I'll give a fix for the Paint Thread and implement ContextWrapper soon, of course, i'll keep Layout.setCurrent() method as it'll be useful to make coding smaller and easier, but for now, it's a low-priority issue
Beta Was this translation helpful? Give feedback.
All reactions