-
Notifications
You must be signed in to change notification settings - Fork 1
Add Java CLI for converting Android AVD skins to Codename One #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Java CLI for converting Android AVD skins to Codename One #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| private void handleKeyValue(String line) { | ||
| Context ctx = contextStack.peek(); | ||
| if (ctx == null) { | ||
| return; | ||
| } | ||
| OrientationType orientation = findCurrentOrientation(); | ||
| if (orientation == null) { | ||
| return; | ||
| } | ||
| OrientationInfoBuilder builder = builders.computeIfAbsent(orientation, o -> new OrientationInfoBuilder()); | ||
| String[] parts = splitKeyValue(line); | ||
| if (parts == null) { | ||
| return; | ||
| } | ||
| String key = parts[0]; | ||
| String value = parts[1]; | ||
| String ctxName = ctx.name.toLowerCase(Locale.ROOT); | ||
| if (ctxName.contains("image") && key.equalsIgnoreCase("name")) { | ||
| builder.imageName = value; | ||
| } else if (ctxName.contains("display")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Track the main orientation image instead of the last image seen
While parsing the layout file, imageName is overwritten every time the parser encounters any image block inside an orientation. In typical AVD layouts each orientation declares many images (frame, button highlights, power icons, etc.), so whichever image appears last becomes the one used to build the skin. That often points to a tiny control graphic instead of the full device frame, leaving the generated skin.png unrelated to the display bounds and producing a useless skin. The parser should recognise and keep only the frame image (e.g., by selecting the largest image or by limiting matches to the appropriate section) instead of blindly overwriting imageName for every image block.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_6908b13431648331bc862c2a1db5c9a3