[ICS] Landscape resources are not used in landscape mode

RESOLVED FIXED in Firefox 11

Status

()

Firefox for Android
General
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: sriram, Assigned: sriram)

Tracking

unspecified
Firefox 12
All
Android
Points:
---

Firefox Tracking Flags

(firefox11 fixed, firefox12 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
ICS has separate resources specified for landscape mode. However, they aren't used by Android.
(Assignee)

Comment 1

6 years ago
From my primary investigation, if the app is launched in landscape mode (holding the device landscape mode), the landscape specific resources are used. However, they are not used when rotating from portrait mode. This is because the views aren't redrawn during the orientation change.
(In reply to Sriram Ramasubramanian [:sriram] from comment #1)
> From my primary investigation, if the app is launched in landscape mode
> (holding the device landscape mode), the landscape specific resources are
> used. However, they are not used when rotating from portrait mode. This is
> because the views aren't redrawn during the orientation change.

Is this because we have android:configChanges="orientation" in AndroidManifest.xml?
(Assignee)

Comment 3

6 years ago
We need to track "orientation" to avoid restarting activity. However, in onConfigurationChange(), we should redraw the layout for landscape. Which doesn't seem to work.
(Assignee)

Comment 4

6 years ago
Created attachment 583412 [details] [diff] [review]
Patch

This patch solves the issue (phew!)
Ideally invalidate() should do the trick. However, it is not taking the new configuration into account while redrawing.
I had to inflate the mBrowserToolbar again. Since we have a different landscape view only for ICS, this is done only for honeycomb+ devices (as the action bar is changed).
The orientation has to be saved to compare against, as inside onConfigurationChanged(), getConfiguration().orientation will be same as newConfig.orientation.

I found few files (drawable-land-v14/ and drawable-port-v14/) not needed. I have removed them in this patch.
Assignee: nobody → sriram
Attachment #583412 - Flags: review?(mark.finkle)
Attachment #583412 - Flags: review?(mark.finkle) → review+
Whiteboard: [fennec-aurora]
https://hg.mozilla.org/integration/mozilla-inbound/rev/23681bd07e4a
(Assignee)

Updated

6 years ago
Depends on: 712808

Comment 6

6 years ago
https://hg.mozilla.org/mozilla-central/rev/23681bd07e4a
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 12
Comment on attachment 583412 [details] [diff] [review]
Patch

[Approval Request Comment]
User impact if declined: We use the wrong assests in the UI
Testing completed (on m-c, etc.): It's been on m-c for a while
Risk to taking this patch (and alternatives if risky): Low risk
Attachment #583412 - Flags: approval-mozilla-aurora?
status-firefox11: --- → affected
status-firefox12: --- → fixed
Whiteboard: [fennec-aurora]

Comment 8

6 years ago
Comment on attachment 583412 [details] [diff] [review]
Patch

[Triage Comment]
Mobile only - approved for Aurora.
Attachment #583412 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/3e4decfc3bb3
status-firefox11: affected → fixed
You need to log in before you can comment on or make changes to this bug.