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

Issue 1955813002: Create TextViewWithLeading. (Closed)

Created:
4 years, 7 months ago by PEConn
Modified:
4 years, 7 months ago
CC:
chromium-reviews, mcwilliams+watch_chromium.org, dgn+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Create TextViewWithLeading. Create an extension of the TextView class that performs the calculations necessary to set the text leading in XML. The calculation was taken from go/md-text-reco. BUG=607803 Committed: https://crrev.com/916492e02a7ee04834f260c2e58d01c17f823b85 Cr-Commit-Position: refs/heads/master@{#392888}

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -5 lines) Patch
M chrome/android/java/res/layout/new_tab_page_snippets_card.xml View 2 chunks +8 lines, -5 lines 0 comments Download
M ui/android/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M ui/android/java/res/values/attrs.xml View 1 chunk +3 lines, -0 lines 0 comments Download
A ui/android/java/src/org/chromium/ui/widget/TextViewWithLeading.java View 1 1 chunk +34 lines, -0 lines 1 comment Download

Messages

Total messages: 23 (10 generated)
PEConn
PTAL, and do we have any preferences for which owners to use for the other ...
4 years, 7 months ago (2016-05-06 09:42:49 UTC) #3
May
lgtm Among the owners, maybe tedchoc@ would be the best to take a look at ...
4 years, 7 months ago (2016-05-06 11:18:18 UTC) #4
Bernhard Bauer
On 2016/05/06 09:42:49, PEConn1 wrote: > PTAL, and do we have any preferences for which ...
4 years, 7 months ago (2016-05-06 12:20:23 UTC) #5
PEConn
https://codereview.chromium.org/1955813002/diff/1/ui/android/java/src/org/chromium/ui/widget/TextViewWithLeading.java File ui/android/java/src/org/chromium/ui/widget/TextViewWithLeading.java (right): https://codereview.chromium.org/1955813002/diff/1/ui/android/java/src/org/chromium/ui/widget/TextViewWithLeading.java#newcode18 ui/android/java/src/org/chromium/ui/widget/TextViewWithLeading.java:18: * it to be set in XML. On 2016/05/06 ...
4 years, 7 months ago (2016-05-06 15:11:40 UTC) #7
Bernhard Bauer
LGTM
4 years, 7 months ago (2016-05-06 15:16:16 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1955813002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1955813002/20001
4 years, 7 months ago (2016-05-06 15:23:23 UTC) #10
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-06 16:35:30 UTC) #12
PEConn
Miguel, could I please get an LGTM for the files in ui/ ?
4 years, 7 months ago (2016-05-11 08:36:02 UTC) #14
Miguel Garcia
lgtm for ui/android
4 years, 7 months ago (2016-05-11 08:37:58 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1955813002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1955813002/20001
4 years, 7 months ago (2016-05-11 08:52:45 UTC) #18
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 7 months ago (2016-05-11 09:53:40 UTC) #20
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/916492e02a7ee04834f260c2e58d01c17f823b85 Cr-Commit-Position: refs/heads/master@{#392888}
4 years, 7 months ago (2016-05-11 09:55:38 UTC) #22
Ted C
4 years, 7 months ago (2016-05-11 17:25:53 UTC) #23
Message was sent while issue was closed.
https://codereview.chromium.org/1955813002/diff/20001/ui/android/java/src/org...
File ui/android/java/src/org/chromium/ui/widget/TextViewWithLeading.java
(right):

https://codereview.chromium.org/1955813002/diff/20001/ui/android/java/src/org...
ui/android/java/src/org/chromium/ui/widget/TextViewWithLeading.java:28: final
float oldLeading = getPaint().getFontMetrics(null);
out of curiosity, did you try this on pre-L?

Dan recently pointed out to me that lineSpacingExtra was applied for even single
lines pre L which rarely is what we wanted.

Maybe this accounts for it, but you should quickly test on JB/KK to see if this
looks bad there.

Powered by Google App Engine
This is Rietveld 408576698