Merge "Support clipping in InlineContentView" into rvc-dev am: 449851f8e2 am: f5e93decb5 am: d15e6ec73f am: 64ebd3d495
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11962498 Change-Id: I47a21340b137d81aab1cae57f8dc2564fbd4a2cf
This commit is contained in:
@@ -20,6 +20,7 @@ import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.content.Context;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.graphics.Rect;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.SurfaceControl;
|
||||
@@ -164,6 +165,7 @@ public class InlineContentView extends ViewGroup {
|
||||
public InlineContentView(@NonNull Context context, @Nullable AttributeSet attrs,
|
||||
int defStyleAttr) {
|
||||
this(context, attrs, defStyleAttr, 0);
|
||||
mSurfaceView.setEnableSurfaceClipping(true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -177,6 +179,12 @@ public class InlineContentView extends ViewGroup {
|
||||
return mSurfaceView.getSurfaceControl();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setClipBounds(Rect clipBounds) {
|
||||
super.setClipBounds(clipBounds);
|
||||
mSurfaceView.setClipBounds(clipBounds);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @hide
|
||||
|
||||
Reference in New Issue
Block a user