From 83f27f563c3e8ebc62d4cc5c4b6b36389eed7f47 Mon Sep 17 00:00:00 2001 From: Sarmad Hashmi Date: Sat, 5 Mar 2016 20:33:38 -0800 Subject: Add share button to voicemail cards. +Add share icon and string +Added share button to voicemail_playback_layout.xml +Link to icon: https://icons.googleplex.com/#icon=ic_share BUG=22798485 Change-Id: Iab9051f4824a4fa0eed90049a762aaac032cf3bf --- res/drawable-hdpi/ic_share_white_24dp.png | Bin 0 -> 397 bytes res/drawable-mdpi/ic_share_white_24dp.png | Bin 0 -> 268 bytes res/drawable-xhdpi/ic_share_white_24dp.png | Bin 0 -> 496 bytes res/drawable-xxhdpi/ic_share_white_24dp.png | Bin 0 -> 698 bytes res/drawable-xxxhdpi/ic_share_white_24dp.png | Bin 0 -> 938 bytes res/layout/voicemail_playback_layout.xml | 13 +++++++++++++ res/values/strings.xml | 3 +++ .../android/dialer/voicemail/VoicemailPlaybackLayout.java | 14 ++++++++++++++ src/com/android/dialerbind/ObjectFactory.java | 4 ++++ 9 files changed, 34 insertions(+) create mode 100644 res/drawable-hdpi/ic_share_white_24dp.png create mode 100644 res/drawable-mdpi/ic_share_white_24dp.png create mode 100644 res/drawable-xhdpi/ic_share_white_24dp.png create mode 100644 res/drawable-xxhdpi/ic_share_white_24dp.png create mode 100644 res/drawable-xxxhdpi/ic_share_white_24dp.png diff --git a/res/drawable-hdpi/ic_share_white_24dp.png b/res/drawable-hdpi/ic_share_white_24dp.png new file mode 100644 index 000000000..b09a6926d Binary files /dev/null and b/res/drawable-hdpi/ic_share_white_24dp.png differ diff --git a/res/drawable-mdpi/ic_share_white_24dp.png b/res/drawable-mdpi/ic_share_white_24dp.png new file mode 100644 index 000000000..e944fd70c Binary files /dev/null and b/res/drawable-mdpi/ic_share_white_24dp.png differ diff --git a/res/drawable-xhdpi/ic_share_white_24dp.png b/res/drawable-xhdpi/ic_share_white_24dp.png new file mode 100644 index 000000000..22a8783e7 Binary files /dev/null and b/res/drawable-xhdpi/ic_share_white_24dp.png differ diff --git a/res/drawable-xxhdpi/ic_share_white_24dp.png b/res/drawable-xxhdpi/ic_share_white_24dp.png new file mode 100644 index 000000000..a35b3cd14 Binary files /dev/null and b/res/drawable-xxhdpi/ic_share_white_24dp.png differ diff --git a/res/drawable-xxxhdpi/ic_share_white_24dp.png b/res/drawable-xxxhdpi/ic_share_white_24dp.png new file mode 100644 index 000000000..e351c7beb Binary files /dev/null and b/res/drawable-xxxhdpi/ic_share_white_24dp.png differ diff --git a/res/layout/voicemail_playback_layout.xml b/res/layout/voicemail_playback_layout.xml index 984a52bf1..178e888bb 100644 --- a/res/layout/voicemail_playback_layout.xml +++ b/res/layout/voicemail_playback_layout.xml @@ -102,6 +102,19 @@ android:tint="@color/voicemail_icon_tint" android:contentDescription="@string/call_log_trash_voicemail" /> + + + + Archive voicemail + + Share voicemail + Voicemail deleted diff --git a/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java b/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java index 0cbe7f2c2..8c869d183 100644 --- a/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java +++ b/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java @@ -275,7 +275,11 @@ public class VoicemailPlaybackLayout extends LinearLayout private ImageButton mPlaybackSpeakerphone; private ImageButton mDeleteButton; private ImageButton mArchiveButton; + private ImageButton mShareButton; + private Space mArchiveSpace; + private Space mShareSpace; + private TextView mStateText; private TextView mPositionText; private TextView mTotalDurationText; @@ -304,6 +308,12 @@ public class VoicemailPlaybackLayout extends LinearLayout updateArchiveUI(mVoicemailUri); updateArchiveButton(mVoicemailUri); } + + if (ObjectFactory.isVoicemailShareEnabled(mContext)) { + // Show share button and space before it + mShareSpace.setVisibility(View.VISIBLE); + mShareButton.setVisibility(View.VISIBLE); + } } @Override @@ -315,7 +325,11 @@ public class VoicemailPlaybackLayout extends LinearLayout mPlaybackSpeakerphone = (ImageButton) findViewById(R.id.playback_speakerphone); mDeleteButton = (ImageButton) findViewById(R.id.delete_voicemail); mArchiveButton =(ImageButton) findViewById(R.id.archive_voicemail); + mShareButton = (ImageButton) findViewById(R.id.share_voicemail); + mArchiveSpace = (Space) findViewById(R.id.space_before_archive_voicemail); + mShareSpace = (Space) findViewById(R.id.space_before_share_voicemail); + mStateText = (TextView) findViewById(R.id.playback_state_text); mPositionText = (TextView) findViewById(R.id.playback_position_text); mTotalDurationText = (TextView) findViewById(R.id.total_duration_text); diff --git a/src/com/android/dialerbind/ObjectFactory.java b/src/com/android/dialerbind/ObjectFactory.java index 935c9f73a..9f75e3912 100644 --- a/src/com/android/dialerbind/ObjectFactory.java +++ b/src/com/android/dialerbind/ObjectFactory.java @@ -48,6 +48,10 @@ public class ObjectFactory { return false; } + public static boolean isVoicemailShareEnabled(Context context) { + return false; + } + @Nullable public static ExtendedBlockingButtonRenderer newExtendedBlockingButtonRenderer( Context context, ExtendedBlockingButtonRenderer.Listener listener) { -- cgit v1.2.3