Loading packages/SystemUI/res-keyguard/drawable/qs_media_seamless_background.xml 0 → 100644 +26 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2020 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 --> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/media_seamless_border"> <item android:id="@android:id/background"> <shape android:color="@android:color/transparent"> <stroke android:width="1dp" android:color="@color/media_seamless_border"/> <corners android:radius="24dp"/> </shape> </item> </ripple> No newline at end of file packages/SystemUI/res/layout/media_view.xml +1 −1 Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ android:id="@+id/media_seamless" android:layout_width="0dp" android:layout_height="wrap_content" android:foreground="@*android:drawable/media_seamless_background" android:foreground="@drawable/qs_media_seamless_background" android:background="@drawable/qs_media_light_source" android:orientation="horizontal" android:forceHasOverlappingRendering="false" Loading packages/SystemUI/res/values/colors.xml +1 −0 Original line number Diff line number Diff line Loading @@ -248,6 +248,7 @@ <color name="media_secondary_text">#99ffffff</color> <!-- 60% --> <color name="media_seekbar_progress">#c0ffffff</color> <color name="media_disabled">#80ffffff</color> <color name="media_seamless_border">#26ffffff</color> <!-- 15% --> <!-- controls --> <color name="control_primary_text">#E6FFFFFF</color> Loading packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java +0 −9 Original line number Diff line number Diff line Loading @@ -20,13 +20,10 @@ import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.content.res.ColorStateList; import android.graphics.Color; import android.graphics.Outline; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; import android.graphics.drawable.Icon; import android.graphics.drawable.RippleDrawable; import android.media.session.MediaController; import android.media.session.MediaSession; import android.media.session.PlaybackState; Loading Loading @@ -258,12 +255,6 @@ public class MediaControlPanel { ImageView iconView = mViewHolder.getSeamlessIcon(); TextView deviceName = mViewHolder.getSeamlessText(); // Update the outline color RippleDrawable bkgDrawable = (RippleDrawable) mViewHolder.getSeamless().getForeground(); GradientDrawable rect = (GradientDrawable) bkgDrawable.getDrawable(0); rect.setStroke(2, deviceName.getCurrentTextColor()); rect.setColor(Color.TRANSPARENT); final MediaDeviceData device = data.getDevice(); final int seamlessId = mViewHolder.getSeamless().getId(); final int seamlessFallbackId = mViewHolder.getSeamlessFallback().getId(); Loading Loading
packages/SystemUI/res-keyguard/drawable/qs_media_seamless_background.xml 0 → 100644 +26 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2020 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 --> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/media_seamless_border"> <item android:id="@android:id/background"> <shape android:color="@android:color/transparent"> <stroke android:width="1dp" android:color="@color/media_seamless_border"/> <corners android:radius="24dp"/> </shape> </item> </ripple> No newline at end of file
packages/SystemUI/res/layout/media_view.xml +1 −1 Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ android:id="@+id/media_seamless" android:layout_width="0dp" android:layout_height="wrap_content" android:foreground="@*android:drawable/media_seamless_background" android:foreground="@drawable/qs_media_seamless_background" android:background="@drawable/qs_media_light_source" android:orientation="horizontal" android:forceHasOverlappingRendering="false" Loading
packages/SystemUI/res/values/colors.xml +1 −0 Original line number Diff line number Diff line Loading @@ -248,6 +248,7 @@ <color name="media_secondary_text">#99ffffff</color> <!-- 60% --> <color name="media_seekbar_progress">#c0ffffff</color> <color name="media_disabled">#80ffffff</color> <color name="media_seamless_border">#26ffffff</color> <!-- 15% --> <!-- controls --> <color name="control_primary_text">#E6FFFFFF</color> Loading
packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java +0 −9 Original line number Diff line number Diff line Loading @@ -20,13 +20,10 @@ import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.content.res.ColorStateList; import android.graphics.Color; import android.graphics.Outline; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; import android.graphics.drawable.Icon; import android.graphics.drawable.RippleDrawable; import android.media.session.MediaController; import android.media.session.MediaSession; import android.media.session.PlaybackState; Loading Loading @@ -258,12 +255,6 @@ public class MediaControlPanel { ImageView iconView = mViewHolder.getSeamlessIcon(); TextView deviceName = mViewHolder.getSeamlessText(); // Update the outline color RippleDrawable bkgDrawable = (RippleDrawable) mViewHolder.getSeamless().getForeground(); GradientDrawable rect = (GradientDrawable) bkgDrawable.getDrawable(0); rect.setStroke(2, deviceName.getCurrentTextColor()); rect.setColor(Color.TRANSPARENT); final MediaDeviceData device = data.getDevice(); final int seamlessId = mViewHolder.getSeamless().getId(); final int seamlessFallbackId = mViewHolder.getSeamlessFallback().getId(); Loading