Skip to content

Conversation

@shai-almog
Copy link
Contributor

Summary

  • add a Java 21 single-file CLI that transforms Android AVD skins into Codename One skin archives
  • parse emulator layout and hardware metadata to determine display bounds, density, and device classification
  • generate Codename One skin images and property files from the AVD resources

Testing

  • javac AvdSkinToCodenameOneSkin.java

https://chatgpt.com/codex/tasks/task_e_6908b13431648331bc862c2a1db5c9a3

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

Comment on lines 251 to 270
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")) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@shai-almog shai-almog merged commit 961bcbe into master Nov 6, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants