Merge "Slight adjustments to gradient shown when dragging to dismiss" into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1eeeba6af6
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user