summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/voicemail/listui/res
diff options
context:
space:
mode:
authorlinyuh <linyuh@google.com>2018-05-16 16:18:46 -0700
committerCopybara-Service <copybara-piper@google.com>2018-05-16 16:19:29 -0700
commit4a8890f37496bf669734772068b3d684007c42f9 (patch)
tree5bc78cfca0bf571b752c5fc48321f98a93f18a0e /java/com/android/dialer/voicemail/listui/res
parentb86b1a295178dc77d1b6b4af59d561d54c7469cf (diff)
Implement accessibility for the new voicemail fragment.
Bug: 70989658 Test: Manual PiperOrigin-RevId: 196907085 Change-Id: If3db2d6906245f052e756b315365b9d306f9d06d
Diffstat (limited to 'java/com/android/dialer/voicemail/listui/res')
-rw-r--r--java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry.xml41
-rw-r--r--java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry_alert.xml5
-rw-r--r--java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_media_player_layout.xml6
-rw-r--r--java/com/android/dialer/voicemail/listui/res/values/strings.xml29
4 files changed, 56 insertions, 25 deletions
diff --git a/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry.xml b/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry.xml
index 8dbe96117..b880e0ffc 100644
--- a/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry.xml
+++ b/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry.xml
@@ -17,23 +17,23 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="72dp">
- <QuickContactBadge
- android:id="@+id/quick_contact_photo"
- android:layout_width="40dp"
- android:layout_height="40dp"
- android:layout_marginTop="16dp"
- android:layout_marginStart="16dp"
- android:layout_marginEnd="16dp"
- android:focusable="true"/>
+ <com.android.dialer.widget.ContactPhotoView
+ android:id="@+id/contact_photo_view"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="12dp"
+ android:layout_marginStart="8dp"
+ android:layout_marginEnd="8dp"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_toEndOf="@+id/quick_contact_photo"
+ android:layout_toEndOf="@+id/contact_photo_view"
android:layout_toStartOf="@+id/menu_button"
android:orientation="vertical">
@@ -42,9 +42,8 @@
style="@style/PrimaryText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_marginEnd="6dp"
android:layout_marginTop="14dp"
+ android:layout_marginEnd="6dp"
android:ellipsize="end"
android:lineSpacingMultiplier="1.5"
android:singleLine="true"/>
@@ -52,16 +51,18 @@
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:orientation="horizontal">
+ android:orientation="horizontal"
+ tools:ignore="UseCompoundDrawables">
<ImageView
android:layout_width="wrap_content"
android:layout_height="18dp"
android:layout_gravity="center_vertical"
+ android:importantForAccessibility="no"
android:src="@drawable/quantum_ic_voicemail_vd_theme_24"
android:tint="@color/dialtacts_theme_color"
android:tintMode="multiply"
- />
+ tools:ignore="ContentDescription"/>
<TextView
android:id="@+id/secondary_text"
@@ -97,22 +98,16 @@
android:id="@+id/new_voicemail_media_player"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:visibility="gone"
- />
-
+ android:visibility="gone"/>
</LinearLayout>
<ImageView
android:id="@+id/menu_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="12dp"
- android:layout_marginBottom="12dp"
- android:layout_marginStart="4dp"
- android:layout_marginEnd="4dp"
+ android:layout_width="56dp"
+ android:layout_height="72dp"
android:layout_alignParentEnd="true"
- android:padding="12dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
+ android:contentDescription="@string/a11y_voicemail_entry_expand_menu"
android:scaleType="center"
android:src="@drawable/quantum_ic_more_vert_vd_theme_24"
android:tint="@color/dialer_secondary_text_color"/>
diff --git a/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry_alert.xml b/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry_alert.xml
index 18a368647..c7029516b 100644
--- a/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry_alert.xml
+++ b/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry_alert.xml
@@ -18,6 +18,7 @@
<!-- TODO(uabdullah): Use a relative layout instead of nested linear layouts.-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/voicemail_alert_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -38,7 +39,9 @@
android:layout_width="@dimen/voicemail_promo_card_icon_size"
android:layout_height="@dimen/voicemail_promo_card_icon_size"
android:layout_gravity="top"
- android:src="@drawable/ic_voicemail_error_24px"/>
+ android:importantForAccessibility="no"
+ android:src="@drawable/ic_voicemail_error_24px"
+ tools:ignore="ContentDescription"/>
<LinearLayout
android:layout_width="match_parent"
diff --git a/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_media_player_layout.xml b/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_media_player_layout.xml
index 3efcea543..279614291 100644
--- a/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_media_player_layout.xml
+++ b/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_media_player_layout.xml
@@ -74,6 +74,7 @@
android:id="@+id/pauseButton"
style="@style/voicemail_media_player_buttons"
android:layout_weight="1"
+ android:contentDescription="@string/a11y_voicemail_entry_pause"
android:src="@drawable/quantum_ic_pause_vd_theme_24"
android:visibility="gone"/>
@@ -81,6 +82,7 @@
android:id="@+id/playButton"
style="@style/voicemail_media_player_buttons"
android:layout_weight="1"
+ android:contentDescription="@string/a11y_voicemail_entry_play"
android:src="@drawable/quantum_ic_play_arrow_vd_theme_24"/>
@@ -88,6 +90,7 @@
android:id="@+id/speakerButton"
style="@style/voicemail_media_player_buttons"
android:layout_weight="1"
+ android:contentDescription="@string/a11y_voicemail_entry_speaker"
android:src="@drawable/quantum_ic_volume_up_vd_theme_24"/>
@@ -95,13 +98,14 @@
android:id="@+id/phoneButton"
style="@style/voicemail_media_player_buttons"
android:layout_weight="1"
+ android:contentDescription="@string/a11y_voicemail_entry_call"
android:src="@drawable/quantum_ic_phone_vd_theme_24"/>
<ImageButton
android:id="@+id/deleteButton"
style="@style/voicemail_media_player_buttons"
android:layout_weight="1"
+ android:contentDescription="@string/a11y_voicemail_entry_delete"
android:src="@drawable/quantum_ic_delete_vd_theme_24"/>
-
</LinearLayout>
</LinearLayout> \ No newline at end of file
diff --git a/java/com/android/dialer/voicemail/listui/res/values/strings.xml b/java/com/android/dialer/voicemail/listui/res/values/strings.xml
index dc54daa19..bfa81f731 100644
--- a/java/com/android/dialer/voicemail/listui/res/values/strings.xml
+++ b/java/com/android/dialer/voicemail/listui/res/values/strings.xml
@@ -15,6 +15,35 @@
~ limitations under the License
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!--
+ A string to describe available action for accessibility user. It will be read as "call number".
+ -->
+ <string name="a11y_voicemail_entry_call">Call number</string>
+
+ <!--
+ A string to describe available action for accessibility user. It will be read as "delete".
+ -->
+ <string name="a11y_voicemail_entry_delete">Delete</string>
+
+ <!--
+ A string to describe available action for accessibility user.
+ It will be read as "expand menu for this voicemail entry".
+ -->
+ <string name="a11y_voicemail_entry_expand_menu">
+ Expand menu for this voicemail entry
+ </string>
+
+ <!-- A string to describe available action for accessibility user. It will be read as "pause". -->
+ <string name="a11y_voicemail_entry_pause">Pause</string>
+
+ <!-- A string to describe available action for accessibility user. It will be read as "play". -->
+ <string name="a11y_voicemail_entry_play">Play</string>
+
+ <!--
+ A string to describe available action for accessibility user. It will be read as "speaker".
+ -->
+ <string name="a11y_voicemail_entry_speaker">Speaker</string>
+
<!-- String used to display voicemails from unknown numbers in the voicemail tab. [CHAR LIMIT=30] -->
<string name="voicemail_entry_unknown">Unknown</string>