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

Commit 4cb14eea authored by Mady Mellor's avatar Mady Mellor Committed by android-build-merger
Browse files

Merge "Slight adjustments to gradient shown when dragging to dismiss" into oc-dev am: 1eeeba6a

am: ab1a6195

Change-Id: If0afd973763dee805be2f63a571d79adba9ecd1b
parents 3e7c74ff ab1a6195
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
@@ -772,7 +772,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();