ADFA-3583 | Automate image import for YOLO image placeholders#1243
ADFA-3583 | Automate image import for YOLO image placeholders#1243
Conversation
…ribute formatting
Adds tap listener and file picker to map selected device images to detected placeholders, copying them to the drawable folder.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 14 minutes and 22 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (19)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
Added functionality to allow users to tap on an image placeholder detected by the YOLO model, pick an image from their filesystem, and automatically import it. The image is safely copied to the corresponding
res/drawablefolder, and the generated XML layout is updated to reference the new drawable usingandroid:src.Details
DrawableImportHelperto handle resolving the resource directory, sanitizing filenames, avoiding duplicates, and copying the image stream.ZoomableImageViewto add anonImageTapListenerthat maps view touch coordinates to the original image coordinates.ComputerVisionViewModelto handle placeholder tap events, trigger the content picker, and maintain the state of selected images mapped by placeholder ID.YoloToXmlConverterandLayoutRendererto inject the new@drawable/...references into the generated Android XML tags.document_5143474614021655795.mp4
Ticket
ADFA-3583
Observation
The
DrawableImportHelpersafely handles special characters in image names and ensures a fallback name is provided. It dynamically traverses the directory tree from the provided layout file path to locate the rootres/drawablefolder for injection.