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

Commit 1eeeba6a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Slight adjustments to gradient shown when dragging to dismiss" into oc-dev

parents 08d8e034 d3e90ea4
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="@dimen/pip_dismiss_gradient_height"
    android:background="@drawable/pip_dismiss_scrim"
    android:alpha="0">

    <TextView
+1 −1
Original line number Diff line number Diff line
@@ -748,7 +748,7 @@
    <dimen name="recents_fast_fling_velocity">600dp</dimen>

    <!-- The height of the gradient indicating the dismiss edge when moving a PIP. -->
    <dimen name="pip_dismiss_gradient_height">196dp</dimen>
    <dimen name="pip_dismiss_gradient_height">176dp</dimen>

    <!-- The bottom margin of the PIP drag to dismiss info text shown when moving a PIP. -->
    <dimen name="pip_dismiss_text_bottom_margin">24dp</dimen>
+6 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.graphics.PixelFormat;
import android.graphics.Point;
import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
@@ -72,6 +73,11 @@ public class PipDismissViewController {
            mDismissView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
            mDismissView.forceHasOverlappingRendering(false);

            // Set the gradient background
            Drawable gradient = mContext.getResources().getDrawable(R.drawable.pip_dismiss_scrim);
            gradient.setAlpha((int) (255 * 0.85f));
            mDismissView.setBackground(gradient);

            // Adjust bottom margins of the text
            View text = mDismissView.findViewById(R.id.pip_dismiss_text);
            FrameLayout.LayoutParams tlp = (FrameLayout.LayoutParams) text.getLayoutParams();