Common Orientation Change Bugs in Hr Management Apps: Causes and Fixes

Orientation change bugs stem from how Android and iOS handle configuration changes—specifically, the destruction and recreation of Activities (Android) or view controller re-layout (iOS). In HR manage

June 11, 2026 · 4 min read · Common Issues

What Causes Orientation Change Bugs in HR Management Apps

Orientation change bugs stem from how Android and iOS handle configuration changes—specifically, the destruction and recreation of Activities (Android) or view controller re-layout (iOS). In HR management apps, the problem compounds because these apps combine:

When the OS recreates the Activity during rotation, any of these can desynchronize. The ViewModel survives, but fragment state, listener references, and adapter positions often do not—unless explicitly preserved.

Real-World Impact

Orientation bugs in HR apps carry outsized consequences because users access them during high-stress moments: submitting a leave request before a trip, approving payroll on a tablet, or clocking in from a shared kiosk.

7 Specific Examples in HR Management Apps

1. Onboarding Form State Loss

A new hire rotates their phone while filling out the tax withholding (W-4) form. The Activity recreates, and all entered data—bank routing numbers, tax selections—resets to defaults. The employee submits incorrect withholding.

2. Expense Report Photo Attachment Detachment

An employee attaches a receipt photo to an expense claim, rotates to landscape for a better view, and the Bitmap reference in the fragment is garbage-collected. The attachment shows as "pending" but the file is lost.

3. Org Chart Scroll Position Reset

An HRBP navigates deep into a 200-person org chart on a tablet, rotates to compare two departments side-by-side, and the RecyclerView resets to the CEO node. They lose their position entirely.

4. Biometric Authentication Prompt Dismissal

An employee rotates their device during a biometric login prompt. The BiometricPrompt object loses its callback reference, the dialog vanishes, and the app lands on a blank screen with no recovery path except force-close.

5. Shift Schedule Filter State Corruption

A manager filters the weekly shift schedule by department and role, rotates to landscape to see the wider grid, and the filter Spinner selections reset while the API call still uses old query parameters—showing unfiltered data with filtered UI indicators.

6. Performance Review Slider Value Reset

A manager rates an employee across 15 competency sliders, rotates to read comments in landscape, and all slider values snap to their default midpoint. Submitting locks in inaccurate ratings.

7. Time-Off Balance Display Stale After Rotation

An employee checks remaining PTO balance, rotates, and the LiveData observer re-subscribes but the cached value from the previous orientation shows an outdated balance. They request time off based on incorrect data.

How to Detect Orientation Change Bugs

Manual testing protocol:

Automated detection with SUSATest:

Upload your APK to SUSATest and let its autonomous agents—particularly the impatient and power user personas—hammer orientation changes across every screen. SUSA's flow tracking assigns PASS/FAIL verdicts to login, registration, and checkout-equivalent HR flows (onboarding, time-off requests, payroll submission) after each rotation. Coverage analytics will flag screens with zero orientation-change test coverage.

Code-level detection:

How to Fix Each Example

Fix 1: Onboarding Form State

Use SavedStateHandle in your ViewModel:


class OnboardingViewModel(savedStateHandle: SavedStateHandle) : ViewModel() {
    var bankRouting: String by savedStateHandle.saveable { mutableStateOf("") }
    var taxSelections: Map<String, Int> by savedStateHandle.saveable { mutableStateOf(emptyMap()) }
}

For Compose, use rememberSaveable instead of remember.

Fix 2: Expense Photo Attachment

Store the photo URI, not the Bitmap, in the ViewModel's SavedStateHandle. Reconstruct the preview from the URI in onViewCreated.

Fix 3: Org Chart Scroll Position

Save LinearLayoutManager state:


override fun onSaveInstanceState(outState: Bundle) {
    outState.putParcelable("layout_state", layoutManager?.onSaveInstanceState())
}

Restore in onViewStateRestored.

Fix 4: Biometric Prompt

Create the BiometricPrompt in the ViewModel or a retained fragment, not the Activity. Pass a LifecycleOwner that survives rotation.

Fix 5: Shift Schedule Filter State

Bind filter selections to ViewModel StateFlow, not fragment fields. The UI reads from the ViewModel post-rotation and stays consistent with the API call parameters.

Fix 6: Performance Review Sliders

Use rememberSaveable (Compose) or onSaveInstanceState (View system) for each slider value. Never rely on view state alone.

Fix 7: PTO Balance Staleness

Trigger a fresh network call in the ViewModel's init block or use distinctUntilChanged() on the LiveData/StateFlow with a timestamp check to prevent stale cache display.

Prevention: Catching Orientation Bugs Before Release

CI/CD integration:

Add orientation-change test stages to your pipeline. With SUSATest's CLI tool (pip install susatest-agent), integrate autonomous orientation testing into GitHub Actions:


- name: SUSA Orientation Test
  run: |
    susatest-agent run --app app.apk --flows onboarding,expense,schedule --orientation-change

SUSA's cross-session learning means each run builds deeper coverage of your app's rotation behavior, catching regressions that manual testing misses.

Development practices:

WCAG consideration:

Orientation-locked content fails WCAG 1.3.4 (Orientation). HR apps used by employees with disabilities must support both orientations. SUSATest's accessibility persona validates this automatically against WCAG 2.1 AA criteria.

Orientation bugs are preventable, detectable, and fixable—but only if your testing strategy treats device rotation as a core interaction, not an afterthought.

Test Your App Autonomously

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.

Try SUSA Free