summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/ViewOutlineProvider.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/view/ViewOutlineProvider.java')
-rw-r--r--core/java/android/view/ViewOutlineProvider.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/java/android/view/ViewOutlineProvider.java b/core/java/android/view/ViewOutlineProvider.java
index 64624ae..4054031 100644
--- a/core/java/android/view/ViewOutlineProvider.java
+++ b/core/java/android/view/ViewOutlineProvider.java
@@ -25,7 +25,8 @@ import android.graphics.drawable.Drawable;
public abstract class ViewOutlineProvider {
/**
* Default outline provider for Views, which queries the Outline from the View's background,
- * or returns <code>false</code> if the View does not have a background.
+ * or generates a 0 alpha, rectangular Outline the size of the View if a background
+ * isn't present.
*
* @see Drawable#getOutline(Outline)
*/
@@ -35,6 +36,10 @@ public abstract class ViewOutlineProvider {
Drawable background = view.getBackground();
if (background != null) {
background.getOutline(outline);
+ } else {
+
+ outline.setRect(0, 0, view.getWidth(), view.getHeight());
+ outline.setAlpha(0.0f);
}
}
};