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

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

Issue 2449943002: Add pending line item support for web payments. (Closed)
Patch Set: Created 4 years, 2 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
Index: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java
index 800bf2b3f89f5a3a5a2fc4753e5877f7aa90cf13..67ddd3c3edad3276b615a71caf1eeb09c79239e6 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java
@@ -603,8 +603,9 @@ public abstract class PaymentRequestSection extends LinearLayout implements View
LineItem item = cart.getContents().get(i);
TextView description = new TextView(context);
- ApiCompatibilityUtils.setTextAppearance(
- description, R.style.PaymentsUiSectionDescriptiveTextEndAligned);
+ ApiCompatibilityUtils.setTextAppearance(description, item.getIsPending()
+ ? R.style.PaymentsUiSectionPendingTextEndAligned
+ : R.style.PaymentsUiSectionDescriptiveTextEndAligned);
description.setText(item.getLabel());
description.setEllipsize(TruncateAt.END);
description.setMaxLines(2);
@@ -613,8 +614,9 @@ public abstract class PaymentRequestSection extends LinearLayout implements View
}
TextView amount = new TextView(context);
- ApiCompatibilityUtils.setTextAppearance(
- amount, R.style.PaymentsUiSectionDescriptiveTextEndAligned);
+ ApiCompatibilityUtils.setTextAppearance(amount, item.getIsPending()
+ ? R.style.PaymentsUiSectionPendingTextEndAligned
+ : R.style.PaymentsUiSectionDescriptiveTextEndAligned);
amount.setText(createValueString(item.getCurrency(), item.getPrice(), false));
// Each item is represented by a row in the GridLayout.

Powered by Google App Engine
This is Rietveld 408576698