OSDN Git Service

Add text descriptions for icons in DeskClock.
authorDaniel Sandler <dsandler@google.com>
Thu, 12 Nov 2009 01:33:13 +0000 (17:33 -0800)
committerDaniel Sandler <dsandler@google.com>
Thu, 12 Nov 2009 01:33:13 +0000 (17:33 -0800)
Fixes http://b/2249982 (these icons were inaccessible to TTS).

res/layout-land/desk_clock.xml
res/layout/desk_clock.xml
res/layout/desk_clock_buttons.xml
res/values/strings.xml

index afaaa6b..32ab781 100644 (file)
@@ -78,6 +78,7 @@
                     android:layout_height="wrap_content"
                     android:layout_width="wrap_content"
                     android:src="@drawable/ic_round_brightness"
+                    android:contentDescription="@string/nightmode_button_description"
                     />
             </LinearLayout>
 
index 5dfd262..eced4f9 100644 (file)
@@ -72,6 +72,7 @@
                     android:layout_height="wrap_content"
                     android:layout_width="wrap_content"
                     android:src="@drawable/ic_round_brightness"
+                    android:contentDescription="@string/nightmode_button_description"
                     />
             </LinearLayout>
 
index b7110c1..9d72282 100644 (file)
@@ -26,6 +26,7 @@
         android:layout_width="fill_parent"
         android:layout_weight=".25"
         android:src="@drawable/ic_clock_strip_alarm"
+        android:contentDescription="@string/alarm_button_description"
         />
     <ImageButton android:id="@+id/gallery_button"
                style="@style/ButtonStripMiddle"
@@ -33,6 +34,7 @@
         android:layout_width="fill_parent"
         android:layout_weight=".25"
         android:src="@drawable/ic_clock_strip_gallery"
+        android:contentDescription="@string/gallery_button_description"
         />
     <ImageButton android:id="@+id/music_button"
                style="@style/ButtonStripMiddle"
@@ -40,6 +42,7 @@
         android:layout_width="fill_parent"
         android:layout_weight=".25"
         android:src="@drawable/ic_clock_strip_music"
+        android:contentDescription="@string/music_button_description"
         />
     <ImageButton android:id="@+id/home_button"
                style="@style/ButtonStripRight"
@@ -47,5 +50,6 @@
         android:layout_width="fill_parent"
         android:layout_weight=".25"
         android:src="@drawable/ic_clock_strip_home"
+        android:contentDescription="@string/home_button_description"
         />
 </LinearLayout>
index 26a2b44..b4cbabc 100644 (file)
       <item>2</item>
     </string-array>
 
-    <!-- Placeholders --><skip/>
-    <string name="alarm_button_title_placeholder">Alarms</string>
-    <string name="gallery_button_title_placeholder">Gallery</string>
-    <string name="music_button_title_placeholder">Music</string>
-    <string name="nightmode_button_title_placeholder">Dim</string>
-    <string name="home_button_title_placeholder">Launcher</string>
+    <!-- Accessibility labels for Clock activity buttons --><skip/>
+    <string name="alarm_button_description">Alarms</string>
+    <string name="gallery_button_description">Gallery</string>
+    <string name="music_button_description">Music</string>
+    <string name="nightmode_button_description">Dim</string>
+    <string name="home_button_description">Launcher</string>
 
     <!-- A short representation of charging information, e.g "34%" -->
     <string name="battery_charging_level"><xliff:g id="number">%d</xliff:g><xliff:g id="percent">%%</xliff:g></string>