From 8d84a50fa1c86f730105cd648bb2454f365830d4 Mon Sep 17 00:00:00 2001 From: olly Date: Fri, 13 Nov 2020 01:00:36 +0000 Subject: [PATCH] Update Styled non bottom buttons to be borderless. This requires the parent of the background to draw and have padding large enough to support the size of the ripple. The bottom buttons must remained bordered as the space around them is constrained. PiperOrigin-RevId: 342162231 --- RELEASENOTES.md | 1 + ..._selectable_item_background_borderless.xml} | 14 ++++---------- .../src/main/res/drawable/exo_ripple_ffwd.xml | 18 +++++------------- .../src/main/res/drawable/exo_ripple_rew.xml | 18 +++++------------- ..._selectable_item_background_borderless.xml} | 14 ++++---------- .../exo_styled_embedded_transport_controls.xml | 2 ++ library/ui/src/main/res/values/colors.xml | 2 -- library/ui/src/main/res/values/styles.xml | 3 ++- 8 files changed, 23 insertions(+), 49 deletions(-) rename library/ui/src/main/res/drawable-v21/{exo_ripple_rew.xml => exo_selectable_item_background_borderless.xml} (63%) rename library/ui/src/main/res/{drawable-v21/exo_ripple_ffwd.xml => drawable/exo_selectable_item_background_borderless.xml} (63%) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 5f5df4377c..94d173da4e 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -36,6 +36,7 @@ `LeanbackPlayerAdapter` and use `ControlDispatcher` for dispatching prepare instead ([#7882](https://github.com/google/ExoPlayer/issues/7882)). + * Switch StyledPlayerView button controls to borderless ripples. * Audio: * Retry playback after some types of `AudioTrack` error. * Work around `AudioManager` crashes when calling `getStreamVolume` diff --git a/library/ui/src/main/res/drawable-v21/exo_ripple_rew.xml b/library/ui/src/main/res/drawable-v21/exo_selectable_item_background_borderless.xml similarity index 63% rename from library/ui/src/main/res/drawable-v21/exo_ripple_rew.xml rename to library/ui/src/main/res/drawable-v21/exo_selectable_item_background_borderless.xml index ee43206b4a..e9b1474003 100644 --- a/library/ui/src/main/res/drawable-v21/exo_ripple_rew.xml +++ b/library/ui/src/main/res/drawable-v21/exo_selectable_item_background_borderless.xml @@ -14,13 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - - - - + + + + diff --git a/library/ui/src/main/res/drawable/exo_ripple_ffwd.xml b/library/ui/src/main/res/drawable/exo_ripple_ffwd.xml index 9f7e1fd027..f28eef2839 100644 --- a/library/ui/src/main/res/drawable/exo_ripple_ffwd.xml +++ b/library/ui/src/main/res/drawable/exo_ripple_ffwd.xml @@ -14,16 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - - - - - - - - - + + + + diff --git a/library/ui/src/main/res/drawable/exo_ripple_rew.xml b/library/ui/src/main/res/drawable/exo_ripple_rew.xml index 5562b1352c..a2cc2f8908 100644 --- a/library/ui/src/main/res/drawable/exo_ripple_rew.xml +++ b/library/ui/src/main/res/drawable/exo_ripple_rew.xml @@ -14,16 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - - - - - - - - - + + + + diff --git a/library/ui/src/main/res/drawable-v21/exo_ripple_ffwd.xml b/library/ui/src/main/res/drawable/exo_selectable_item_background_borderless.xml similarity index 63% rename from library/ui/src/main/res/drawable-v21/exo_ripple_ffwd.xml rename to library/ui/src/main/res/drawable/exo_selectable_item_background_borderless.xml index 5e4dd5550f..7a267a0a52 100644 --- a/library/ui/src/main/res/drawable-v21/exo_ripple_ffwd.xml +++ b/library/ui/src/main/res/drawable/exo_selectable_item_background_borderless.xml @@ -14,13 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - - - - + + + + diff --git a/library/ui/src/main/res/layout/exo_styled_embedded_transport_controls.xml b/library/ui/src/main/res/layout/exo_styled_embedded_transport_controls.xml index 75db3e4527..ab82d5350d 100644 --- a/library/ui/src/main/res/layout/exo_styled_embedded_transport_controls.xml +++ b/library/ui/src/main/res/layout/exo_styled_embedded_transport_controls.xml @@ -16,8 +16,10 @@ - #808080 - #80808080 #ffffff #B3ffffff #B3000000 diff --git a/library/ui/src/main/res/values/styles.xml b/library/ui/src/main/res/values/styles.xml index 38daccb377..8b48f2fcb5 100644 --- a/library/ui/src/main/res/values/styles.xml +++ b/library/ui/src/main/res/values/styles.xml @@ -59,7 +59,7 @@