OSDN Git Service

Adding content description to effect buttons
authorDoris Liu <tianliu@google.com>
Wed, 15 Aug 2012 17:21:03 +0000 (10:21 -0700)
committerDoris Liu <tianliu@google.com>
Wed, 15 Aug 2012 17:53:59 +0000 (10:53 -0700)
This CL adds content description/accessiblity label to the special effects buttons in photo editor.

Bug: 6676889
Change-Id: I5446c95b5ec6a1084d82feb102e11b3b722254d1

res/layout/photoeditor_actionbar.xml
res/layout/photoeditor_effects_color.xml
res/layout/photoeditor_effects_menu.xml
res/values/photoeditor_strings.xml

index e0adbbe..c82faca 100644 (file)
         <com.android.gallery3d.photoeditor.ImageActionButton
             android:id="@+id/undo_button"
             style="@style/ImageActionButton"
-            android:src="@drawable/photoeditor_undo"/>
+            android:src="@drawable/photoeditor_undo"
+            android:contentDescription="@string/photoeditor_undo"/>
         <com.android.gallery3d.photoeditor.ImageActionButton
             android:id="@+id/redo_button"
             style="@style/ImageActionButton"
-            android:src="@drawable/photoeditor_redo"/>
+            android:src="@drawable/photoeditor_redo"
+            android:contentDescription="@string/photoeditor_redo"/>
 
         <ViewSwitcher
             android:id="@+id/save_share_buttons"
index 72cfe7a..a2a88b2 100644 (file)
@@ -43,6 +43,7 @@
         <TextView
             android:id="@+id/effect_label"
             android:text="@string/grayscale"
+            android:contentDescription="@string/accessibility_black_and_white"
             style="@style/EffectLabel"/>
     </com.android.gallery3d.photoeditor.actions.GrayscaleAction>
     <com.android.gallery3d.photoeditor.actions.SepiaAction style="@style/Effect">
index a0b102d..2cc1701 100644 (file)
         <com.android.gallery3d.photoeditor.ImageActionButton
             android:id="@+id/exposure_button"
             style="@style/EffectsMenuActionButton"
-            android:src="@drawable/photoeditor_exposure"/>
+            android:src="@drawable/photoeditor_exposure"
+            android:contentDescription="@string/photoeditor_exposure"/>
         <com.android.gallery3d.photoeditor.ImageActionButton
             android:id="@+id/artistic_button"
             style="@style/EffectsMenuActionButton"
-            android:src="@drawable/photoeditor_artistic"/>
+            android:src="@drawable/photoeditor_artistic"
+            android:contentDescription="@string/photoeditor_artistic"/>
         <com.android.gallery3d.photoeditor.ImageActionButton
             android:id="@+id/color_button"
             style="@style/EffectsMenuActionButton"
-            android:src="@drawable/photoeditor_color"/>
+            android:src="@drawable/photoeditor_color"
+            android:contentDescription="@string/photoeditor_color"/>
         <com.android.gallery3d.photoeditor.ImageActionButton
             android:id="@+id/fix_button"
             style="@style/EffectsMenuActionButton"
-            android:src="@drawable/photoeditor_fix"/>
+            android:src="@drawable/photoeditor_fix"
+            android:contentDescription="@string/photoeditor_fix"/>
     </LinearLayout>
 
 </FrameLayout>
index f53e5a6..59312b5 100644 (file)
@@ -75,6 +75,9 @@
     <!-- Name for the photo effect that converts colors to black-and-white, abbreviated B&W. [CHAR LIMIT=15] -->
     <string name="grayscale">B&amp;W</string>
 
+    <!-- Name for the photo effect that converts colors to black-and-white in accessibility mode [CHAR LIMIT=15] -->
+    <string name="accessibility_black_and_white">Black and white</string>
+
     <!-- Name for the photo effect that adds highlights. [CHAR LIMIT=15] -->
     <string name="highlight">Highlights</string>
 
 
     <!-- Tool-tip toast shown when the user chooses to straighten photo. [CHAR LIMIT=40] -->
     <string name="straighten_tooltip">Drag photo to straighten it</string>
+
+    <!-- Name for the exposure adjustment button in photo effects editor menu. [CHAR LIMIT=40] -->
+    <string name="photoeditor_exposure">Exposure</string>
+
+    <!-- Name for the color adjustment button in photo effects editor menu. [CHAR LIMIT=40] -->
+    <string name="photoeditor_color">Color editing</string>
+
+    <!-- Name for the artistic effect button in photo effects editor menu. [CHAR LIMIT=40] -->
+    <string name="photoeditor_artistic">Artistic effect</string>
+
+    <!-- Name for the fix up button in photo effects editor menu. [CHAR LIMIT=40] -->
+    <string name="photoeditor_fix">Fix up</string>
+
+    <!-- Name for the undo button in photo editor action bar. [CHAR LIMIT=40] -->
+    <string name="photoeditor_undo">Undo</string>
+
+    <!-- Name for the redo button in photo editor action bar. [CHAR LIMIT=40] -->
+    <string name="photoeditor_redo">Redo</string>
+
 </resources>