New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 758915 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Email to this user bounced
Closed: Aug 2017
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task



Sign in to add a comment

dpToPx methods in many classes

Project Member Reported by galinap@google.com, Aug 25 2017

Issue description

Currently we have many classes defining their own dpToPx() method. It would be nice to have one method defined somewhere, that all classes can refer to when they need this conversion.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/25a175243caf4a2ceeceb58a2ceb83e8125974cd

commit 25a175243caf4a2ceeceb58a2ceb83e8125974cd
Author: galinap <galinap@google.com>
Date: Wed Aug 30 14:45:49 2017

Moving all dpToPx conversions to ViewUtils.

This CL unifies the use of dpToPx by removing all previous occurences
of this function and directing all classes to use ViewUtils.dpToPx()

There are two methods - one taking a Context and one taking
DisplayMetrics. This is to make it easier for callers to provide the
needed information without cluttering their code.

Bug:  758915 
Change-Id: I3bff4fb3550c2eb7792d281f1b11e072b3bdb101
Reviewed-on: https://chromium-review.googlesource.com/635443
Commit-Queue: Galia Peycheva <galinap@google.com>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Reviewed-by: Nicolas Dossou-Gbété <dgn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498460}
[modify] https://crrev.com/25a175243caf4a2ceeceb58a2ceb83e8125974cd/chrome/android/java/src/org/chromium/chrome/browser/notifications/CustomNotificationBuilder.java
[modify] https://crrev.com/25a175243caf4a2ceeceb58a2ceb83e8125974cd/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPageViewMD.java
[modify] https://crrev.com/25a175243caf4a2ceeceb58a2ceb83e8125974cd/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java
[modify] https://crrev.com/25a175243caf4a2ceeceb58a2ceb83e8125974cd/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SiteExplorePageIndicatorView.java
[modify] https://crrev.com/25a175243caf4a2ceeceb58a2ceb83e8125974cd/chrome/android/java/src/org/chromium/chrome/browser/util/ViewUtils.java

Comment 2 by galinap@google.com, Aug 30 2017

Status: Fixed (was: Started)

Sign in to add a comment