Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6aa3a8fa authored by Galia Peycheva's avatar Galia Peycheva
Browse files

Add background blur to tv volume dialog

Bug: 182905790
Test: m && check volume dialog appears as expected
Test: disable blur with 'adb shell wm disable-blur 1' and check volume
      control ui switches to fallback non-blurry variant
Change-Id: Icd0897bb33bf5d929a43d26df2ba64cbf4eb0267
parent d4a14271
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">

  <solid android:color="@color/tv_volume_dialog_background" />
  <corners android:radius="@dimen/tv_volume_dialog_corner_radius"/>
  <solid android:color="@color/volume_dialog_background_color" />
  <corners android:radius="?android:attr/dialogCornerRadius"/>

</shape>
+3 −2
Original line number Diff line number Diff line
@@ -40,14 +40,15 @@
            android:translationZ="@dimen/volume_dialog_elevation"
            android:clipChildren="false"
            android:clipToPadding="false"
            android:background="@drawable/tv_volume_dialog_background">
            android:background="@android:color/transparent">

            <LinearLayout
                android:id="@+id/volume_dialog_rows"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:orientation="horizontal">
                android:orientation="horizontal"
                android:background="@drawable/tv_volume_dialog_background">
                <!-- volume rows added and removed here! :-) -->
            </LinearLayout>

+1 −1
Original line number Diff line number Diff line
@@ -22,9 +22,9 @@
  <dimen name="volume_dialog_panel_transparent_padding">24dp</dimen>
  <dimen name="volume_dialog_slider_width">4dp</dimen>
  <dimen name="volume_dialog_slider_corner_radius">@dimen/volume_dialog_slider_width</dimen>
  <dimen name="volume_dialog_background_blur_radius">100dp</dimen>

  <dimen name="tv_volume_dialog_bubble_size">36dp</dimen>
  <dimen name="tv_volume_dialog_corner_radius">36dp</dimen>
  <dimen name="tv_volume_dialog_row_padding">6dp</dimen>
  <dimen name="tv_volume_number_text_size">16sp</dimen>
  <dimen name="tv_volume_seek_bar_thumb_diameter">24dp</dimen>
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
 * Copyright 2021, 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.
 */
-->
<resources>
    <color name="volume_dialog_background_color">#E61F232B</color>
    <color name="volume_dialog_background_color_above_blur">#C71F232B</color>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -60,4 +60,7 @@

    <!-- The duraction of the hide animation for the volume dialog in milliseconds -->
    <integer name="config_dialogHideAnimationDurationMs">400</integer>

    <!-- Whether to use window background blur for the volume dialog. -->
    <bool name="config_volumeDialogUseBackgroundBlur">true</bool>
</resources>
Loading