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

Commit 724e1319 authored by Ben Lin's avatar Ben Lin Committed by Android (Google) Code Review
Browse files

Merge "PiP: Add rounded corners to the menu." into sc-dev

parents 8cb8a364 7366a4b1
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 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.
  -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle">
    <solid android:color="#FF000000"/>

    <corners android:radius="@dimen/pip_corner_radius" />
</shape>
 No newline at end of file
+5 −1
Original line number Diff line number Diff line
@@ -130,7 +130,11 @@ public class PipMenuView extends FrameLayout {
        mAccessibilityManager = context.getSystemService(AccessibilityManager.class);
        inflate(context, R.layout.pip_menu, this);

        mBackgroundDrawable = new ColorDrawable(Color.BLACK);
        final boolean enableCornerRadius = mContext.getResources()
                .getBoolean(R.bool.config_pipEnableRoundCorner);
        mBackgroundDrawable = enableCornerRadius
                ? mContext.getDrawable(R.drawable.pip_menu_background)
                : new ColorDrawable(Color.BLACK);
        mBackgroundDrawable.setAlpha(0);
        mViewRoot = findViewById(R.id.background);
        mViewRoot.setBackground(mBackgroundDrawable);