Skip to content

Apps list keeps the widescreen 64dp side padding after rotating back to portrait #781

Description

@kasnder

Symptom. On the Apps tab of the main screen, the app list stays inset by 64dp on each side after opening the app in widescreen (landscape / any window >= 820dp wide) and rotating back to portrait. The widescreen layout is retained until the activity is recreated.

Repro. Open TrackerControl in widescreen so the values-w820dp config applies, then rotate to portrait. The list keeps the 64dp inset; rotating again does not fix it. A fresh portrait launch is unaffected.

Root cause. ActivityMain declares android:configChanges="orientation|screenSize" (AndroidManifest.xml:82), so rotation does not recreate the activity. The llApps container's horizontal padding (app/src/main/res/layout/main.xml:99-102, @dimen/activity_horizontal_margin) is resolved at inflation time — 64dp under values-w820dp/dimens.xml, 0dp in the base values/dimens.xml — and the already-inflated views keep the stale wide-screen value. onConfigurationChanged (ActivityMain.java:612) is a no-op for this case, so nothing re-applies the portrait-resolved padding.

Note. The Timeline tab has no such inset, so the Apps list is inconsistent with it on wide screens anyway.

Fix direction. Either re-apply the resource-resolved padding to llApps in onConfigurationChanged (e.g. read activity_horizontal_margin from getResources() and setPadding), or drop the horizontal padding attributes from llApps so it is full-bleed like the Timeline. The other activities carrying configChanges="orientation|screenSize" in the manifest may share the same latent issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions