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

Commit 90382b7f authored by Fabián Kozynski's avatar Fabián Kozynski
Browse files

Make bg of QSCustomizer transparent

Test: manual
Fixes: 405307053
Flag: com.android.systemui.notification_shade_blur
Change-Id: Ia0d33b95b853eb8c3352550524e6945bf156e3ff
parent f592160b
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 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.
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android">
    <shape>
        <solid android:color="@color/transparent"/>
        <corners android:radius="?android:attr/dialogCornerRadius" />
    </shape>
</inset>
+19 −0
Original line number Diff line number Diff line
<!--
    Copyright (C) 2015 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.
-->
<transition xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/qs_customizer_background_transition" />
    <item android:drawable="@drawable/qs_customizer_background_primary_transparent" />
</transition>
+17 −3
Original line number Diff line number Diff line
@@ -15,11 +15,14 @@
 */
package com.android.systemui.qs.customize;

import static com.android.systemui.Flags.notificationShadeBlur;

import android.animation.Animator;
import android.animation.Animator.AnimatorListener;
import android.animation.AnimatorListenerAdapter;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Color;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.LayoutInflater;
@@ -71,8 +74,16 @@ public class QSCustomizer extends LinearLayout {
        super(context, attrs);

        LayoutInflater.from(getContext()).inflate(R.layout.qs_customize_panel_content, this);
        mClipper = new QSDetailClipper(findViewById(R.id.customize_container));
        View customizeContainer = findViewById(R.id.customize_container);
        if (notificationShadeBlur()) {
            customizeContainer
                    .setBackgroundResource(R.drawable.qs_customizer_background_transparent);
        }
        mClipper = new QSDetailClipper(customizeContainer);
        mToolbar = findViewById(com.android.internal.R.id.action_bar);
        if (notificationShadeBlur()) {
            mToolbar.setBackgroundColor(Color.TRANSPARENT);
        }
        TypedValue value = new TypedValue();
        mContext.getTheme().resolveAttribute(android.R.attr.homeAsUpIndicator, value, true);
        mToolbar.setNavigationIcon(
@@ -108,7 +119,9 @@ public class QSCustomizer extends LinearLayout {
                findViewById(R.id.nav_bar_background).setVisibility(View.GONE);
            } else {
                findViewById(R.id.nav_bar_background)
                        .setVisibility(mIsShowingNavBackdrop ? View.VISIBLE : View.GONE);
                        .setVisibility(
                                mIsShowingNavBackdrop && !notificationShadeBlur() ? View.VISIBLE
                                        : View.GONE);
            }
        }
    }
@@ -124,7 +137,8 @@ public class QSCustomizer extends LinearLayout {
                || newConfig.orientation != Configuration.ORIENTATION_LANDSCAPE;
        if (navBackdrop != null) {
            navBackdrop.setVisibility(
                    mIsShowingNavBackdrop && !mSceneContainerEnabled ? View.VISIBLE : View.GONE);
                    mIsShowingNavBackdrop && !mSceneContainerEnabled && !notificationShadeBlur()
                            ? View.VISIBLE : View.GONE);
        }
        updateNavColors(lightBarController);
    }