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

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

Issue 2973763003: Photo Picker dialog: Polish to adhere better to spec. (Closed)
Patch Set: Sync and merge Created 3 years, 5 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 | « chrome/android/java/res/values/colors.xml ('k') | 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/photo_picker/PickerBitmapView.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/PickerBitmapView.java b/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/PickerBitmapView.java
index 737a2161046c6301b9bf9d5cc17c1de8e6861ee1..6e4cedf149fb6f40a421528fc32cee3ed2662c46 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/PickerBitmapView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/PickerBitmapView.java
@@ -332,12 +332,11 @@ public class PickerBitmapView extends SelectableItemView<PickerBitmap> {
if (!special) {
bgColorId = R.color.photo_picker_tile_bg_color;
} else {
+ bgColorId = R.color.photo_picker_special_tile_bg_color;
int fgColorId;
if (!anySelection) {
- bgColorId = R.color.photo_picker_special_tile_bg_color;
fgColorId = R.color.photo_picker_special_tile_color;
} else {
- bgColorId = R.color.photo_picker_special_tile_disabled_bg_color;
fgColorId = R.color.photo_picker_special_tile_disabled_color;
}
@@ -350,13 +349,13 @@ public class PickerBitmapView extends SelectableItemView<PickerBitmap> {
setBackgroundColor(ApiCompatibilityUtils.getColor(resources, bgColorId));
- // The visibility of the unselected image is a little more complex because we don't want
- // to show it when nothing is selected and also not on a blank canvas.
+ // The visibility of the unselected toggle for multi-selection mode is a little more complex
+ // because we don't want to show it when nothing is selected and also not on a blank canvas.
mSelectedView.setVisibility(!special && checked ? View.VISIBLE : View.GONE);
- mUnselectedView.setVisibility(
- !special && !checked && anySelection && mImageLoaded ? View.VISIBLE : View.GONE);
- mScrim.setVisibility(
- !special && !checked && anySelection && mImageLoaded ? View.VISIBLE : View.GONE);
+ boolean showUnselectedToggle = !special && !checked && anySelection && mImageLoaded
+ && mCategoryView.isMultiSelectAllowed();
+ mUnselectedView.setVisibility(showUnselectedToggle ? View.VISIBLE : View.GONE);
+ mScrim.setVisibility(showUnselectedToggle ? View.VISIBLE : View.GONE);
}
private boolean isGalleryTile() {
« no previous file with comments | « chrome/android/java/res/values/colors.xml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698