summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/quantum/res/drawable/quantum_ic_delete_vd_theme_24.xml25
-rw-r--r--assets/quantum/res/drawable/quantum_ic_play_arrow_vd_theme_24.xml25
-rw-r--r--assets/quantum/res/drawable/quantum_ic_volume_up_vd_theme_24.xml25
-rw-r--r--java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayerView.java22
-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
7 files changed, 151 insertions, 18 deletions
diff --git a/assets/quantum/res/drawable/quantum_ic_delete_vd_theme_24.xml b/assets/quantum/res/drawable/quantum_ic_delete_vd_theme_24.xml
new file mode 100644
index 000000000..900b559e3
--- /dev/null
+++ b/assets/quantum/res/drawable/quantum_ic_delete_vd_theme_24.xml
@@ -0,0 +1,25 @@
+<!--
+ ~ 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
+ -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:tint="?attr/colorControlNormal"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
+</vector> \ No newline at end of file
diff --git a/assets/quantum/res/drawable/quantum_ic_play_arrow_vd_theme_24.xml b/assets/quantum/res/drawable/quantum_ic_play_arrow_vd_theme_24.xml
new file mode 100644
index 000000000..e17e625a5
--- /dev/null
+++ b/assets/quantum/res/drawable/quantum_ic_play_arrow_vd_theme_24.xml
@@ -0,0 +1,25 @@
+<!--
+ ~ 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
+ -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0"
+ android:tint="?attr/colorControlNormal">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M8,5v14l11,-7z"/>
+</vector> \ No newline at end of file
diff --git a/assets/quantum/res/drawable/quantum_ic_volume_up_vd_theme_24.xml b/assets/quantum/res/drawable/quantum_ic_volume_up_vd_theme_24.xml
new file mode 100644
index 000000000..ac14beced
--- /dev/null
+++ b/assets/quantum/res/drawable/quantum_ic_volume_up_vd_theme_24.xml
@@ -0,0 +1,25 @@
+<!--
+ ~ 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
+ -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:tint="?attr/colorControlNormal"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M3,9v6h4l5,5L12,4L7,9L3,9zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM14,3.23v2.06c2.89,0.86 5,3.54 5,6.71s-2.11,5.85 -5,6.71v2.06c4.01,-0.91 7,-4.49 7,-8.77s-2.99,-7.86 -7,-8.77z"/>
+</vector> \ No newline at end of file
diff --git a/java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayerView.java b/java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayerView.java
index 4629ce277..d5db60846 100644
--- a/java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayerView.java
+++ b/java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayerView.java
@@ -30,7 +30,7 @@ import android.support.v4.util.Pair;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
-import android.widget.Button;
+import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.android.dialer.common.Assert;
@@ -45,9 +45,10 @@ import com.android.dialer.voicemail.model.VoicemailEntry;
*/
public class NewVoicemailMediaPlayerView extends LinearLayout {
- private Button playButton;
- private Button speakerButton;
- private Button deleteButton;
+ private ImageButton playButton;
+ private ImageButton speakerButton;
+ private ImageButton phoneButton;
+ private ImageButton deleteButton;
private TextView totalDurationView;
private Uri voicemailUri;
private FragmentManager fragmentManager;
@@ -72,6 +73,7 @@ public class NewVoicemailMediaPlayerView extends LinearLayout {
private void initializeMediaPlayerButtonsAndViews() {
playButton = findViewById(R.id.playButton);
speakerButton = findViewById(R.id.speakerButton);
+ phoneButton = findViewById(R.id.phoneButton);
deleteButton = findViewById(R.id.deleteButton);
totalDurationView = findViewById(R.id.playback_seek_total_duration);
}
@@ -79,6 +81,7 @@ public class NewVoicemailMediaPlayerView extends LinearLayout {
private void setupListenersForMediaPlayerButtons() {
playButton.setOnClickListener(playButtonListener);
speakerButton.setOnClickListener(speakerButtonListener);
+ phoneButton.setOnClickListener(phoneButtonListener);
deleteButton.setOnClickListener(deleteButtonListener);
}
@@ -164,6 +167,17 @@ public class NewVoicemailMediaPlayerView extends LinearLayout {
}
};
+ private final View.OnClickListener phoneButtonListener =
+ new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ LogUtil.i(
+ "NewVoicemailMediaPlayer.phoneButtonListener",
+ "speaker request for voicemailUri: %s",
+ voicemailUri.toString());
+ }
+ };
+
private final View.OnClickListener deleteButtonListener =
new View.OnClickListener() {
@Override
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