Tags: codenameone/CodenameOne
Tags
Fix ES_COMPARING_PARAMETER_STRING_WITH_EQ SpotBugs warnings (#4361) Replaced string comparison using '==' with '.equals()' or 'Objects.equals()' in Font.java, SideMenuBar.java, and TestUtils.java. Updated generate-quality-report.py to enforce this rule. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Fix screenshot API in Android implementation (#4107) * Fix Android screenshot API to include PeerComponents The screenshot() method in AndroidImplementation was missing PeerComponents (native Android views like BrowserComponent, MapView, etc.) in the captured image on devices running Android < API 26 (Oreo). The issue was in the AndroidScreenshotTask.tryFallbackDraw() method, which only drew the CodenameOneSurface view itself. PeerComponents are added as siblings to the CodenameOneSurface within the parent RelativeLayout container, so they were not being captured. The fix: - Draw the parent container (RelativeLayout) instead of just the view - Calculate and apply proper canvas translation to align the content - Maintain backward compatibility by falling back to view-only drawing if no parent is found Note: The PixelCopy method (API 26+) already worked correctly as it captures the entire window, so this only affects older Android versions. * Fixed Android screenshot test --------- Co-authored-by: Claude <noreply@anthropic.com>
PreviousNext