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

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

Issue 2703463002: [List UI Unification] Basic list unification for phones (Closed)
Patch Set: [List UI Unification] Basic list unification for phones Created 3 years, 10 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/bookmarks/BookmarkRow.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkRow.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkRow.java
index 6f72fff3944bdc50e8db2beccd8ce76a6ace41e1..df001b6332a63f4e4579ac80beb48e28de4c5ede 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkRow.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkRow.java
@@ -20,6 +20,7 @@ import org.chromium.chrome.browser.bookmarks.BookmarkBridge.BookmarkItem;
import org.chromium.chrome.browser.widget.TintedImageButton;
import org.chromium.chrome.browser.widget.selection.SelectableItemView;
import org.chromium.components.bookmarks.BookmarkId;
+import org.chromium.ui.base.DeviceFormFactor;
import java.util.List;
@@ -186,6 +187,10 @@ abstract class BookmarkRow extends SelectableItemView<BookmarkId> implements Boo
}
});
}
+
+ if (isSelectable() && !DeviceFormFactor.isLargeTablet(getContext())) {
gone 2017/02/17 01:45:02 Is this only called for two out of the three possi
Theresa 2017/02/17 17:34:28 I added some comments. This is temporary, until bo
+ setLateralMarginsForDefaultDisplay(findViewById(R.id.bookmark_row));
+ }
}
@Override
@@ -252,4 +257,10 @@ abstract class BookmarkRow extends SelectableItemView<BookmarkId> implements Boo
public void onFolderStateSet(BookmarkId folder) {
}
+ @Override
+ public void setBackgroundResourceForGroupPosition(
+ boolean isFirstInGroup, boolean isLastInGroup) {
+ if (DeviceFormFactor.isLargeTablet(getContext()) || !isSelectable()) return;
gone 2017/02/17 01:45:02 Leave a comment here about why it's not doing anyt
Theresa 2017/02/17 17:34:28 I added comments in other places and extracted thi
+ super.setBackgroundResourceForGroupPosition(isFirstInGroup, isLastInGroup);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698