diff options
author | Sarmad Hashmi <mhashmi@google.com> | 2016-03-05 20:33:38 -0800 |
---|---|---|
committer | Sarmad Hashmi <mhashmi@google.com> | 2016-03-11 11:17:23 -0800 |
commit | 83f27f563c3e8ebc62d4cc5c4b6b36389eed7f47 (patch) | |
tree | ce7fe386a8820d20f620d358a19f3b38434b2a99 /src/com/android | |
parent | 5f6a4222815abe478045d81d71f65c75ff2cbbbd (diff) |
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
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java | 14 | ||||
-rw-r--r-- | src/com/android/dialerbind/ObjectFactory.java | 4 |
2 files changed, 18 insertions, 0 deletions
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) { |