summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/voicemail/listui/res
diff options
context:
space:
mode:
authoruabdullah <uabdullah@google.com>2017-11-15 10:24:04 -0800
committerzachh <zachh@google.com>2017-11-18 07:29:16 +0000
commit9c5d723468ff0046419d286729060221f00f7577 (patch)
tree1ccd267e1bf16b832d75fe13d7bcc26fb1e1311a /java/com/android/dialer/voicemail/listui/res
parent725c2514c529e4542eeeca30fccf8eb7ad407dc1 (diff)
Replace NUI voicemail media buttons with image buttons
Replaces the existing buttons with Image Buttons using standards images. Also added a phone button. Bug: 64882313,68382421 Test: Unit Tests PiperOrigin-RevId: 175843834 Change-Id: I21898f7da72f3dd17fce0047b11349737b373513
Diffstat (limited to 'java/com/android/dialer/voicemail/listui/res')
-rw-r--r--java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_media_player_layout.xml42
-rw-r--r--java/com/android/dialer/voicemail/listui/res/values/dimens.xml5
-rw-r--r--java/com/android/dialer/voicemail/listui/res/values/styles.xml25
3 files changed, 58 insertions, 14 deletions
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 e8e560059..07ce86a1d 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
@@ -67,22 +67,36 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="10dp"
- android:orientation="horizontal">
- <!-- TODO(a bug): Remove these buttons as this is a place holder for the Media Player -->
- <Button
+ android:gravity="center"
+ android:orientation="horizontal"
+ android:weightSum="4">
+
+
+ <ImageButton
android:id="@+id/playButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Play"/>
- <Button
+ style="@style/voicemail_media_player_buttons"
+ android:layout_weight="1"
+ android:src="@drawable/quantum_ic_play_arrow_vd_theme_24"/>
+
+
+ <ImageButton
android:id="@+id/speakerButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Speaker"/>
- <Button
+ style="@style/voicemail_media_player_buttons"
+ android:layout_weight="1"
+ android:src="@drawable/quantum_ic_volume_up_vd_theme_24"/>
+
+
+ <ImageButton
+ android:id="@+id/phoneButton"
+ style="@style/voicemail_media_player_buttons"
+ android:layout_weight="1"
+ android:src="@drawable/quantum_ic_phone_vd_theme_24"/>
+
+ <ImageButton
android:id="@+id/deleteButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Delete"/>
+ style="@style/voicemail_media_player_buttons"
+ android:layout_weight="1"
+ 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/dimens.xml b/java/com/android/dialer/voicemail/listui/res/values/dimens.xml
index 6c062ae28..e37bc65fe 100644
--- a/java/com/android/dialer/voicemail/listui/res/values/dimens.xml
+++ b/java/com/android/dialer/voicemail/listui/res/values/dimens.xml
@@ -29,6 +29,11 @@
<dimen name="voicemail_icon_size">16dp</dimen>
<dimen name="voicemail_playback_state_text_size">14sp</dimen>
+ <!-- TODO(uabdullah): Work with UX on this value to ensure proper spacing between
+ the seekbar and transcription -->
<dimen name="voicemail_media_player_padding_top">20dp</dimen>
<dimen name="voicemail_duration_size">14sp</dimen>
+ <!-- TODO(uabdullah): Work with UX on these values so that the touch target is not too small -->
+ <dimen name="voicemail_media_player_height">56dp</dimen>
+ <dimen name="voicemail_media_player_width">0dp</dimen>
</resources>
diff --git a/java/com/android/dialer/voicemail/listui/res/values/styles.xml b/java/com/android/dialer/voicemail/listui/res/values/styles.xml
new file mode 100644
index 000000000..aec46090a
--- /dev/null
+++ b/java/com/android/dialer/voicemail/listui/res/values/styles.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2017 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License
+ -->
+
+<resources>
+
+ <style name="voicemail_media_player_buttons">
+ <item name="android:layout_width">@dimen/voicemail_media_player_width</item>
+ <item name="android:layout_height">@dimen/voicemail_media_player_height</item>
+ <item name="android:background">?android:attr/selectableItemBackgroundBorderless</item>
+ </style>
+</resources> \ No newline at end of file