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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java

Issue 2269293002: [Download Home] Various fixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@DOWNLOADS_activity_tests
Patch Set: Fullscreen activity Created 4 years, 4 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/download/ui/DownloadHistoryAdapter.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java
index 42ee4d7373433bc9335713e2a6ce06bd90d99c97..02885751589a2cf7b4c077e6e0722fef5387ce4e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java
@@ -73,7 +73,6 @@ public class DownloadHistoryAdapter extends DateDividedAdapter implements Downlo
private BackendProvider mBackendProvider;
private OfflinePageDownloadBridge.Observer mOfflinePageObserver;
private int mFilter = DownloadFilter.FILTER_ALL;
- private int mFilenameViewTextColor;
DownloadHistoryAdapter(boolean showOffTheRecord, ComponentName parentComponent) {
mShowOffTheRecord = showOffTheRecord;
@@ -332,13 +331,6 @@ public class DownloadHistoryAdapter extends DateDividedAdapter implements Downlo
}
private void setItemViewStyle(ItemViewHolder holder, DownloadHistoryItemWrapper item) {
- if (mFilenameViewTextColor == 0) {
- // The color is not explicitly set in the XML. Programmatically retrieve the original
- // color so that the color can be reset if it's changed due to the contained item
- // being externally removed.
- mFilenameViewTextColor = holder.mFilenameView.getTextColors().getDefaultColor();
- }
-
Context context = holder.itemView.getContext();
Resources res = context.getResources();
if (item.hasBeenExternallyRemoved()) {
@@ -351,7 +343,9 @@ public class DownloadHistoryAdapter extends DateDividedAdapter implements Downlo
| Paint.STRIKE_THRU_TEXT_FLAG);
holder.mFilesizeView.setText(context.getString(R.string.download_manager_ui_deleted));
} else {
- holder.mHostnameView.setTextColor(mFilenameViewTextColor);
+ int sublabelColor = ApiCompatibilityUtils.getColor(res, R.color.google_grey_600);
+
+ holder.mHostnameView.setTextColor(sublabelColor);
holder.mIconView.setBackgroundColor(ApiCompatibilityUtils.getColor(res,
R.color.light_active_color));
holder.mFilenameView.setTextColor(ApiCompatibilityUtils.getColor(res,

Powered by Google App Engine
This is Rietveld 408576698