Closed Bug 712477 Opened 13 years ago Closed 13 years ago

[ICS] Landscape resources are not used in landscape mode

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(firefox11 fixed, firefox12 fixed)

RESOLVED FIXED
Firefox 12
Tracking Status
firefox11 --- fixed
firefox12 --- fixed

People

(Reporter: sriram, Assigned: sriram)

References

Details

Attachments

(1 file)

ICS has separate resources specified for landscape mode. However, they aren't used by Android.
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?
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.
Attached patch Patch (deleted) — Splinter Review
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]
Depends on: 712808
Status: NEW → RESOLVED
Closed: 13 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?
Whiteboard: [fennec-aurora]
Comment on attachment 583412 [details] [diff] [review] Patch [Triage Comment] Mobile only - approved for Aurora.
Attachment #583412 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: