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

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

Issue 2963963002: Photo Picker dialog: Add accessibility support. (Closed)
Patch Set: WithTime Created 3 years, 6 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/src/org/chromium/chrome/browser/photo_picker/PickerBitmap.java ('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 efe355a64fff3534e3c04dbe0e92f364d14989c5..737a2161046c6301b9bf9d5cc17c1de8e6861ee1 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
@@ -14,6 +14,7 @@ import android.support.graphics.drawable.VectorDrawableCompat;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
+import android.view.accessibility.AccessibilityNodeInfo;
import android.view.animation.Animation;
import android.view.animation.ScaleAnimation;
import android.widget.ImageView;
@@ -178,6 +179,19 @@ public class PickerBitmapView extends SelectableItemView<PickerBitmap> {
}
}
+ @Override
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+
+ if (!isPictureTile()) return;
Finnur 2017/06/29 13:26:20 Just in case you are wondering, the Camera and Bro
+
+ info.setCheckable(true);
+ info.setChecked(isChecked());
+ CharSequence text = mBitmapDetails.getFilenameWithoutExtension() + " "
+ + mBitmapDetails.getLastModifiedString();
+ info.setText(text);
+ }
+
/**
* Sets the {@link PickerCategoryView} for this PickerBitmapView.
* @param categoryView The category view showing the images. Used to access
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/photo_picker/PickerBitmap.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698