Skip to content

Fix Android lint baseline warnings#10

Merged
powerje merged 17 commits intotrunkfrom
feature/fix-lint-baseline
Mar 10, 2026
Merged

Fix Android lint baseline warnings#10
powerje merged 17 commits intotrunkfrom
feature/fix-lint-baseline

Conversation

@powerje
Copy link
Copy Markdown
Member

@powerje powerje commented Mar 10, 2026

Summary

  • Fix 1346 Android lint warnings across 17 commits, reducing baseline from 1869 to 523 issues (72% reduction)
  • Categories fully resolved: MissingSuperCall, DrawAllocation, HandlerLeak, ResourceType, DiscouragedApi, InflateParams, ObsoleteSdkInt, SwitchIntDef, ManifestOrder, ScopedStorage, ApplySharedPref, DefaultLocale, SuspiciousIndentation, SdCardPath, SourceLockedOrientationActivity, OldTargetApi, UseRequiresApi
  • Categories significantly reduced: RtlHardcoded (344→5), HardcodedText (460→14), SetTextI18n (115→15), SpUsage (83→0), PxUsage (45→0), SmallSp (8→0), ClickableViewAccessibility (9→0), InefficientWeight (9→0), DisableBaselineAlignment (5→0), RtlSymmetry (16→0)
  • Extract 170+ string resources from hardcoded XML text
  • Replace anonymous Handler classes with static inner classes to prevent memory leaks
  • Move object allocations out of onDraw() methods into preallocated fields
  • Add accessibility content descriptions to ImageButton/ImageView elements
  • Replace hardcoded /sdcard/ paths with Environment.getExternalStorageDirectory()

Remaining baseline (523 issues)

Mostly layout-level issues requiring structural changes: ObsoleteLayoutParam (122), Autofill (81), LabelFor (55), ButtonStyle (50), ContentDescription (46), TextFields (33), UselessParent (32)

@powerje powerje force-pushed the feature/fix-lint-baseline branch from 02ebeee to bb3b0cd Compare March 10, 2026 12:31
@powerje powerje merged commit 994b8e6 into trunk Mar 10, 2026
1 check passed
@powerje powerje deleted the feature/fix-lint-baseline branch March 10, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant