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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java

Issue 2823853004: DO NO SUMMIT: bluetooth: Use a LevelListDrawable instead of an array of drawables
Patch Set: Save icons level Created 3 years, 8 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/ItemChooserDialog.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java b/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java
index 5318960d85db9ea3ce46fba5c58895868eea2bd8..884fdffae38993362d85a754bae6c072658c03dc 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java
@@ -70,6 +70,7 @@ public class ItemChooserDialog {
private String mDescription;
private Drawable mIcon;
private String mIconDescription;
+ private int mIconLevel;
public ItemChooserRow(String key, String description, @Nullable Drawable icon,
@Nullable String iconDescription) {
@@ -77,6 +78,7 @@ public class ItemChooserDialog {
mDescription = description;
mIcon = icon;
mIconDescription = iconDescription;
+ mIconLevel = icon.getLevel();
}
/**
@@ -355,6 +357,7 @@ public class ItemChooserDialog {
if (item.mIcon != null) {
row.mImageView.setContentDescription(item.mIconDescription);
row.mImageView.setImageDrawable(item.mIcon);
+ row.mImageView.setImageLevel(item.mIconLevel);
row.mImageView.setVisibility(View.VISIBLE);
} else {
row.mImageView.setVisibility(View.INVISIBLE);

Powered by Google App Engine
This is Rietveld 408576698