Closed Bug 907852 Opened 11 years ago Closed 11 years ago

Unify position of empty state graphics

Categories

(Firefox for Android Graveyard :: General, defect)

26 Branch
ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 26

People

(Reporter: ibarlow, Assigned: liuche)

References

Details

Attachments

(8 files, 1 obsolete file)

Let's make sure our empty screens are styled consistently -- right now the history ones are sitting a little low compared to the Reading List, which is the one that we should probably try to match

http://cl.ly/image/0Q2I080s1Y3e
The problem here is, the tab-widget and the tip-in-reading-list occupy a constant space. The rest is used by the icon + text.

Let's say we have a fixed size of 100dp for the tab-widget and tip, that would allow the icon+text to used the rest of space -- hence they will be at same level. However the tip's height is not a constant between portrait and landscape modes. Having a constant height of 100dp for tip would have to account for localization issues.
One possible option here is to change the tip to align to parent bottom and "overlay" it on top of the main content. Then add a @dimens/browser_toolbar_height bottom margin/padding to the main content (same height as the tab widget). This way the position of the empty UI will not depend on the tip's height anymore.

The drawback here is that the tip might overlap with the main content if the available height is too small. But, in a way, this is already a problem on the current UI (they don't overlap but they're crammed in a rather small vertical space). We should probably hide the tip when the keyboard is up. This can probably be done via the Fragment's onConfigurationChanged() and then checking the newConfig's keyboardHidden. See:

http://developer.android.com/reference/android/content/res/Configuration.html#keyboardHidden
This is technically the same height, but since there's a bookmarks pane between history tabs and reading list, you can't tell.
Assignee: nobody → liuche
Status: NEW → ASSIGNED
Attachment #796342 - Flags: review?(sriram)
Whoops, "This *isn't" technically the same height"
OS: Mac OS X → Android
Hardware: x86 → ARM
Attached image Screenshot: last tabs
Comment on attachment 796342 [details] [diff] [review]
Patch: empty pages history v1

Review of attachment 796342 [details] [diff] [review]:
-----------------------------------------------------------------

The patch looks good. But the entire content doesn't feel centered on the screen though. :(
Attachment #796342 - Flags: review?(sriram) → review+
I agree that it's not centered - but I was under the impression that that was Ian's ask. The reading list positioning has not changed noticeably, and from Ian's comment #1:

> right now the history ones are sitting a little low compared to the Reading List, 
> which is the one that we should probably try to match

So is that okay?
This is an alternative patch for the empty screen layouts.
Attachment #796853 - Flags: review?(sriram)
Ian, I've uploaded two possible layouts for empty pages, centered vs. top. Not sure which you prefer (though I think sriram likes the centered version :p).
Flags: needinfo?(ibarlow)
Forgot to qref
Attachment #796853 - Attachment is obsolete: true
Attachment #796853 - Flags: review?(sriram)
Attachment #796869 - Flags: review?(sriram)
Attachment #796869 - Flags: review?(sriram) → review+
(In reply to Chenxia Liu [:liuche] from comment #14)
> Ian, I've uploaded two possible layouts for empty pages, centered vs. top.
> Not sure which you prefer (though I think sriram likes the centered version
> :p).

Thanks for showing both options, Chenxia. As per my original comment, I still prefer the one that's slightly closer to the top though :)
Flags: needinfo?(ibarlow)
https://hg.mozilla.org/mozilla-central/rev/aff6afb77f62
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
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: