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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java

Issue 2618783002: [Payments] Fix janky behavior in attribution text in PR UI (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java
index 95289b7696ef10afbf3504f4f3f0a62fb9cc5223..6309c073308ed19ad4e899ca97eb55fb6d159657 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java
@@ -1079,14 +1079,13 @@ public class PaymentRequestUI implements DialogInterface.OnDismissListener, View
view.setMovementMethod(LinkMovementMethod.getInstance());
ApiCompatibilityUtils.setTextAppearance(view, R.style.PaymentsUiSectionDescriptiveText);
- LinearLayout.LayoutParams layoutParams =
- new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
- int marginSize = mContext.getResources().getDimensionPixelSize(
+ // Add paddings instead of margin to let getMeasuredHeight return correct value for section
+ // resize animation.
+ int paddingSize = mContext.getResources().getDimensionPixelSize(
R.dimen.payments_section_large_spacing);
- layoutParams.topMargin = marginSize;
- ApiCompatibilityUtils.setMarginStart(layoutParams, marginSize);
- ApiCompatibilityUtils.setMarginEnd(layoutParams, marginSize);
- parent.addView(view, layoutParams);
+ ApiCompatibilityUtils.setPaddingRelative(
+ view, paddingSize, paddingSize, paddingSize, paddingSize);
+ parent.addView(view);
}
private Callback<SectionInformation> createUpdateSectionCallback(@DataType final int type) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698