Skip to content

ADFA-3490 | Fix screen orientation lock in OnboardingActivity#1139

Merged
jatezzz merged 2 commits intostagefrom
fix/ADFA-3490-orientation-lock
Mar 31, 2026
Merged

ADFA-3490 | Fix screen orientation lock in OnboardingActivity#1139
jatezzz merged 2 commits intostagefrom
fix/ADFA-3490-orientation-lock

Conversation

@jatezzz
Copy link
Copy Markdown
Collaborator

@jatezzz jatezzz commented Mar 31, 2026

Description

Removed the forced portrait orientation lock in OnboardingActivity by deleting the setOrientationFunction block. This allows the onboarding screen to properly respond to system orientation changes (like landscape mode). The associated lint suppression was also removed to maintain clean code.

Details

image
document_5071403752829748746.mp4

Ticket

ADFA-3490

Allows OnboardingActivity to support landscape mode by removing the forced portrait configuration
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 31, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 49a1e6f4-f8ea-432d-8c47-400e1d110fec

📥 Commits

Reviewing files that changed from the base of the PR and between e853bb6 and 96da30b.

📒 Files selected for processing (1)
  • app/src/main/java/com/itsaky/androidide/activities/OnboardingActivity.kt
💤 Files with no reviewable changes (1)
  • app/src/main/java/com/itsaky/androidide/activities/OnboardingActivity.kt

📝 Walkthrough

Release Notes

  • Removed forced portrait orientation lock from OnboardingActivity.onCreate(), allowing the onboarding screen to respond to system orientation changes and support landscape mode
  • Cleaned up imports: Removed unused imports (android.annotation.SuppressLint, android.content.pm.ActivityInfo) that were only needed for the orientation lock implementation
  • Removed lint suppression: Eliminated the @SuppressLint("SourceLockedOrientationActivity") annotation that was suppressing platform warnings about locked orientation

Risks & Best Practices

⚠️ Risk - UI Layout Validation: The onboarding UI layout may not be properly optimized for landscape orientation. Without explicit testing, users rotating their devices to landscape during onboarding could experience:

  • Text clipping or overflow
  • Misaligned UI elements
  • Poor readability on wider screens

Recommendation: Verify that the onboarding flow (greeting, permissions, info screens) renders correctly and remains usable in both portrait and landscape orientations across various device sizes before release.

Best Practice - Lint Suppression Removal: Properly addressed the lint warning by removing the underlying cause rather than just suppressing it, which aligns with Android development best practices.

Walkthrough

The OnboardingActivity has been simplified by removing explicit portrait orientation locking. The suppression annotation, orientation function call, and associated imports (SuppressLint, ActivityInfo) were deleted, allowing the activity to rely on default or system orientation behavior instead of forcing portrait mode during creation.

Changes

Cohort / File(s) Summary
Orientation Lock Removal
app/src/main/java/com/itsaky/androidide/activities/OnboardingActivity.kt
Removed @SuppressLint("SourceLockedOrientationActivity") annotation, setOrientationFunction call that locked orientation to SCREEN_ORIENTATION_PORTRAIT, and corresponding imports.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • hal-eisen-adfa
  • itsaky-adfa

Poem

🐰 Portrait lock, now set free,
No more chains on what screens can be,
Orientation flows naturally—
Flexible onboarding, light as can be! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: removing the screen orientation lock in OnboardingActivity, which is directly reflected in the code changes.
Description check ✅ Passed The description is directly related to the changeset, explaining why the orientation lock was removed and what the expected behavior change is.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ADFA-3490-orientation-lock

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jatezzz jatezzz merged commit b146bf6 into stage Mar 31, 2026
2 checks passed
@jatezzz jatezzz deleted the fix/ADFA-3490-orientation-lock branch March 31, 2026 20:59
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.

3 participants