Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Issue 2956943002: Adding smarter resizing logic for the context menu on orientation changes (Closed)

Created:
3 years, 5 months ago by injae
Modified:
3 years, 5 months ago
Reviewers:
Daniel Park, Ted C, gone, Theresa
CC:
chromium-reviews, agrieve+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Adding smarter resizing logic for the context menu on orientation changes and adding new maxes for width and height. Renamed context_menu_height_padding to context_menu_min_vertical_padding with half the value, but multiplied all usages by 2 so the total values are the same. Added context_menu_min_side_padding. Rewrote sizing logic so width is the minimum of 500 dp or total width - 2 * side_padding Added a max height to context menu row Added a max height to the context menu so it no longer leaks over the edge. The list view now scrolls when the context menu reaches max height. BUG=731173

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -8 lines) Patch
M chrome/android/java/res/layout/tabular_context_menu_page.xml View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/android/java/res/layout/tabular_context_menu_row.xml View 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/android/java/res/values/dimens.xml View 1 chunk +2 lines, -0 lines 2 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/contextmenu/TabularContextMenuViewPager.java View 3 chunks +10 lines, -5 lines 4 comments Download

Messages

Total messages: 9 (6 generated)
Daniel Park
3 years, 5 months ago (2017-06-26 19:51:07 UTC) #6
gone
https://codereview.chromium.org/2956943002/diff/1/chrome/android/java/res/values/dimens.xml File chrome/android/java/res/values/dimens.xml (right): https://codereview.chromium.org/2956943002/diff/1/chrome/android/java/res/values/dimens.xml#newcode477 chrome/android/java/res/values/dimens.xml:477: <dimen name="context_menu_min_side_padding">20dp</dimen> might as well just call this context_menu_min_padding ...
3 years, 5 months ago (2017-06-26 21:17:29 UTC) #7
Daniel Park
3 years, 5 months ago (2017-06-26 21:51:23 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/2956943002/diff/1/chrome/android/java/res/val...
File chrome/android/java/res/values/dimens.xml (right):

https://codereview.chromium.org/2956943002/diff/1/chrome/android/java/res/val...
chrome/android/java/res/values/dimens.xml:477: <dimen
name="context_menu_min_side_padding">20dp</dimen>
On 2017/06/26 21:17:29, dfalcantara wrote:
> might as well just call this context_menu_min_padding

Done.

https://codereview.chromium.org/2956943002/diff/1/chrome/android/java/src/org...
File
chrome/android/java/src/org/chromium/chrome/browser/contextmenu/TabularContextMenuViewPager.java
(right):

https://codereview.chromium.org/2956943002/diff/1/chrome/android/java/src/org...
chrome/android/java/src/org/chromium/chrome/browser/contextmenu/TabularContextMenuViewPager.java:38:

On 2017/06/26 21:17:29, dfalcantara wrote:
> This function needs more comments explaining what's going on.

Done.

https://codereview.chromium.org/2956943002/diff/1/chrome/android/java/src/org...
chrome/android/java/src/org/chromium/chrome/browser/contextmenu/TabularContextMenuViewPager.java:41:
getResources().getDimensionPixelSize(R.dimen.context_menu_min_side_padding);
On 2017/06/26 21:17:29, dfalcantara wrote:
> Because they're constants, you should cache the side and vertical dimension
> paddings out as member fields to prevent having to retrieve this every time
the
> view is measured.

Done.

Powered by Google App Engine
This is Rietveld 408576698