Add the android:clipToOutline attribute for views.
Bug: 179405150 Test: atest Change-Id: Ieeb6b790ea6765e4545c0fd746d37d420d427041 Merged-In: Ieeb6b790ea6765e4545c0fd746d37d420d427041
This commit is contained in:
@@ -435,6 +435,7 @@ package android {
|
||||
field public static final int clickable = 16842981; // 0x10100e5
|
||||
field public static final int clipChildren = 16842986; // 0x10100ea
|
||||
field public static final int clipOrientation = 16843274; // 0x101020a
|
||||
field public static final int clipToOutline = 16844328; // 0x1010628
|
||||
field public static final int clipToPadding = 16842987; // 0x10100eb
|
||||
field public static final int closeIcon = 16843905; // 0x1010481
|
||||
field @Deprecated public static final int codes = 16843330; // 0x1010242
|
||||
|
||||
@@ -740,6 +740,7 @@ import java.util.function.Predicate;
|
||||
* @attr ref android.R.styleable#View_alpha
|
||||
* @attr ref android.R.styleable#View_background
|
||||
* @attr ref android.R.styleable#View_clickable
|
||||
* @attr ref android.R.styleable#View_clipToOutline
|
||||
* @attr ref android.R.styleable#View_contentDescription
|
||||
* @attr ref android.R.styleable#View_drawingCacheQuality
|
||||
* @attr ref android.R.styleable#View_duplicateParentState
|
||||
@@ -5968,6 +5969,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
case R.styleable.View_scrollCaptureHint:
|
||||
setScrollCaptureHint((a.getInt(attr, SCROLL_CAPTURE_HINT_AUTO)));
|
||||
break;
|
||||
case R.styleable.View_clipToOutline:
|
||||
setClipToOutline(a.getBoolean(attr, false));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17921,6 +17925,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
*
|
||||
* @see #setOutlineProvider(ViewOutlineProvider)
|
||||
* @see #getClipToOutline()
|
||||
*
|
||||
* @attr ref android.R.styleable#View_clipToOutline
|
||||
*/
|
||||
@RemotableViewMethod
|
||||
public void setClipToOutline(boolean clipToOutline) {
|
||||
|
||||
@@ -3251,6 +3251,16 @@
|
||||
a value of 'true' will not override any 'false' value in its parent chain nor will
|
||||
it prevent any 'false' in any of its children. -->
|
||||
<attr name="forceDarkAllowed" format="boolean" />
|
||||
|
||||
<!-- <p>Whether the View's Outline should be used to clip the contents of the View.
|
||||
<p>Only a single non-rectangular clip can be applied on a View at any time. Circular
|
||||
clips from a
|
||||
{@link android.view.ViewAnimationUtils#createCircularReveal(View, int, int, float,
|
||||
float)} circular reveal animation take priority over Outline clipping, and child
|
||||
Outline clipping takes priority over Outline clipping done by a parent.
|
||||
<p>Note that this flag will only be respected if the View's Outline returns true from
|
||||
{@link android.graphics.Outline#canClip()}. -->
|
||||
<attr name="clipToOutline" format="boolean" />
|
||||
</declare-styleable>
|
||||
|
||||
<!-- Attributes that can be assigned to a tag for a particular View. -->
|
||||
|
||||
@@ -3062,6 +3062,7 @@
|
||||
<!-- @hide @SystemApi -->
|
||||
<public name="hotwordDetectionService" />
|
||||
<public name="previewLayout" />
|
||||
<public name="clipToOutline" />
|
||||
</public-group>
|
||||
|
||||
<public-group type="drawable" first-id="0x010800b5">
|
||||
|
||||
Reference in New Issue
Block a user