Updates disable states for voicemail.
Use updated disabled assets for voicemail.
Use the correct disable state for the play icon.
Do not show a thumb or already played bar when seek bar is disabled.
Bug: 5282585
Change-Id: I522793b55b36b03e7af6b0195f4005432446e8f8
diff --git a/res/drawable-hdpi/ic_hold_pause_disabled_holo_dark.png b/res/drawable-hdpi/ic_hold_pause_disabled_holo_dark.png
index 60fecb2..d21cc10 100644
--- a/res/drawable-hdpi/ic_hold_pause_disabled_holo_dark.png
+++ b/res/drawable-hdpi/ic_hold_pause_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_minus_disabled_holo_dark.png b/res/drawable-hdpi/ic_minus_disabled_holo_dark.png
index 0d2d93b..c2ad8dc 100644
--- a/res/drawable-hdpi/ic_minus_disabled_holo_dark.png
+++ b/res/drawable-hdpi/ic_minus_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_play_disabled_holo_dark.png b/res/drawable-hdpi/ic_play_disabled_holo_dark.png
new file mode 100644
index 0000000..e3a3853
--- /dev/null
+++ b/res/drawable-hdpi/ic_play_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_plus_disabled_holo_dark.png b/res/drawable-hdpi/ic_plus_disabled_holo_dark.png
index ed65c1c..723e362 100644
--- a/res/drawable-hdpi/ic_plus_disabled_holo_dark.png
+++ b/res/drawable-hdpi/ic_plus_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_hold_pause_disabled_holo_dark.png b/res/drawable-mdpi/ic_hold_pause_disabled_holo_dark.png
index 1f32576..d8cec25 100644
--- a/res/drawable-mdpi/ic_hold_pause_disabled_holo_dark.png
+++ b/res/drawable-mdpi/ic_hold_pause_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_minus_disabled_holo_dark.png b/res/drawable-mdpi/ic_minus_disabled_holo_dark.png
index 76ef6e8..fb0103c 100644
--- a/res/drawable-mdpi/ic_minus_disabled_holo_dark.png
+++ b/res/drawable-mdpi/ic_minus_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_play_disabled_holo_dark.png b/res/drawable-mdpi/ic_play_disabled_holo_dark.png
new file mode 100644
index 0000000..64bed72
--- /dev/null
+++ b/res/drawable-mdpi/ic_play_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_plus_disabled_holo_dark.png b/res/drawable-mdpi/ic_plus_disabled_holo_dark.png
index 2a5947c..70c9a3d 100644
--- a/res/drawable-mdpi/ic_plus_disabled_holo_dark.png
+++ b/res/drawable-mdpi/ic_plus_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_hold_pause_disabled_holo_dark.png b/res/drawable-xhdpi/ic_hold_pause_disabled_holo_dark.png
index 4a45288..9e12338 100644
--- a/res/drawable-xhdpi/ic_hold_pause_disabled_holo_dark.png
+++ b/res/drawable-xhdpi/ic_hold_pause_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_minus_disabled_holo_dark.png b/res/drawable-xhdpi/ic_minus_disabled_holo_dark.png
index 1f09cf8..ae6bce7 100644
--- a/res/drawable-xhdpi/ic_minus_disabled_holo_dark.png
+++ b/res/drawable-xhdpi/ic_minus_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_play_disabled_holo_dark.png b/res/drawable-xhdpi/ic_play_disabled_holo_dark.png
new file mode 100644
index 0000000..9537351
--- /dev/null
+++ b/res/drawable-xhdpi/ic_play_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_plus_disabled_holo_dark.png b/res/drawable-xhdpi/ic_plus_disabled_holo_dark.png
index 5728d50..169da3e 100644
--- a/res/drawable-xhdpi/ic_plus_disabled_holo_dark.png
+++ b/res/drawable-xhdpi/ic_plus_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable/ic_play.xml b/res/drawable/ic_play.xml
new file mode 100644
index 0000000..a8bf05e
--- /dev/null
+++ b/res/drawable/ic_play.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false"
+ android:drawable="@drawable/ic_play_disabled_holo_dark" />
+ <item android:drawable="@drawable/ic_play_holo_dark" />
+</selector>
diff --git a/res/drawable/seek_bar_thumb.xml b/res/drawable/seek_bar_thumb.xml
index 61884bb..2f5ca88 100644
--- a/res/drawable/seek_bar_thumb.xml
+++ b/res/drawable/seek_bar_thumb.xml
@@ -1,34 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
- <!-- First item is the outer transparent sphere. -->
- <item>
- <shape
- android:shape="oval"
- >
- <size
- android:width="16dip"
- android:height="16dip"
- />
- <solid
- android:color="@color/voicemail_playback_seek_bar_yet_to_play"
- />
- </shape>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="true">
+ <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- First item is the outer transparent sphere. -->
+ <item>
+ <shape
+ android:shape="oval"
+ >
+ <size
+ android:width="16dip"
+ android:height="16dip"
+ />
+ <solid
+ android:color="@color/voicemail_playback_seek_bar_yet_to_play"
+ />
+ </shape>
+ </item>
+ <!-- Second item is the inner almost-opaque sphere.
+ Seems to derive its size from the outer, a size element doesn't change anything.
+ Looks like using left, right, top and bottom on the item is best to fix inner sphere. -->
+ <item
+ android:left="3dip"
+ android:right="3dip"
+ android:top="3dip"
+ android:bottom="3dip"
+ >
+ <shape
+ android:shape="oval"
+ >
+ <solid
+ android:color="@color/voicemail_playback_seek_bar_already_played"
+ />
+ </shape>
+ </item>
+ </layer-list>
</item>
- <!-- Second item is the inner almost-opaque sphere.
- Seems to derive its size from the outer, a size element doesn't change anything.
- Looks like using left, right, top and bottom on the item is best to fix inner sphere. -->
- <item
- android:left="3dip"
- android:right="3dip"
- android:top="3dip"
- android:bottom="3dip"
- >
- <shape
- android:shape="oval"
- >
- <solid
- android:color="@color/voicemail_playback_seek_bar_already_played"
- />
- </shape>
- </item>
-</layer-list>
+
+ <!-- Do not show the thumb when disabled -->
+ <item android:drawable="@android:color/transparent" />
+</selector>
\ No newline at end of file
diff --git a/res/drawable/seekbar_drawable.xml b/res/drawable/seekbar_drawable.xml
index 2533b7f..e86f53d 100644
--- a/res/drawable/seekbar_drawable.xml
+++ b/res/drawable/seekbar_drawable.xml
@@ -1,22 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:id="@android:id/background">
- <shape android:shape="line">
- <stroke
- android:width="2dip"
- android:color="@color/voicemail_playback_seek_bar_yet_to_play"
- />
- </shape>
- </item>
- <!-- I am not defining a secondary progress colour - we don't use it. -->
- <item android:id="@android:id/progress">
- <clip>
- <shape android:shape="line">
- <stroke
- android:width="2dip"
- android:color="@color/voicemail_playback_seek_bar_already_played"
- />
- </shape>
- </clip>
- </item>
-</layer-list>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="true">
+ <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:id="@android:id/background">
+ <shape android:shape="line">
+ <stroke
+ android:width="2dip"
+ android:color="@color/voicemail_playback_seek_bar_yet_to_play"
+ />
+ </shape>
+ </item>
+ <!-- I am not defining a secondary progress colour - we don't use it. -->
+ <item android:id="@android:id/progress">
+ <clip>
+ <shape android:shape="line">
+ <stroke
+ android:width="2dip"
+ android:color="@color/voicemail_playback_seek_bar_already_played"
+ />
+ </shape>
+ </clip>
+ </item>
+ </layer-list>
+ </item>
+ <item>
+ <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:id="@android:id/background">
+ <shape android:shape="line">
+ <stroke
+ android:width="2dip"
+ android:color="@color/voicemail_playback_seek_bar_yet_to_play"
+ />
+ </shape>
+ </item>
+ <!-- I am not defining a secondary progress colour - we don't use it. -->
+ <item android:id="@android:id/progress">
+ <clip>
+ <shape android:shape="line">
+ <stroke
+ android:width="2dip"
+ android:color="@color/voicemail_playback_seek_bar_yet_to_play"
+ />
+ </shape>
+ </clip>
+ </item>
+ </layer-list>
+ </item>
+</selector>
diff --git a/src/com/android/contacts/calllog/CallLogListItemHelper.java b/src/com/android/contacts/calllog/CallLogListItemHelper.java
index 602c283..41dc0a3 100644
--- a/src/com/android/contacts/calllog/CallLogListItemHelper.java
+++ b/src/com/android/contacts/calllog/CallLogListItemHelper.java
@@ -88,7 +88,7 @@
/** Sets the secondary action to correspond to the play button. */
private void configurePlaySecondaryAction(CallLogListItemViews views) {
views.secondaryActionView.setVisibility(View.VISIBLE);
- views.secondaryActionView.setImageResource(R.drawable.ic_play_holo_dark);
+ views.secondaryActionView.setImageResource(R.drawable.ic_play);
views.secondaryActionView.setContentDescription(
mResources.getString(R.string.description_call_log_play_button));
}
diff --git a/src/com/android/contacts/voicemail/VoicemailPlaybackFragment.java b/src/com/android/contacts/voicemail/VoicemailPlaybackFragment.java
index df4d9af..8912a74 100644
--- a/src/com/android/contacts/voicemail/VoicemailPlaybackFragment.java
+++ b/src/com/android/contacts/voicemail/VoicemailPlaybackFragment.java
@@ -266,7 +266,7 @@
@Override
public void playbackStopped() {
- mStartStopButton.setImageResource(R.drawable.ic_play_holo_dark);
+ mStartStopButton.setImageResource(R.drawable.ic_play);
}
@Override