From 112f0aa28e017d4d7a3638389709b94a718dadc8 Mon Sep 17 00:00:00 2001 From: Alan Viverette Date: Thu, 14 Apr 2016 11:22:44 -0400 Subject: [PATCH] Basic documentation for custom drawables Bug: 23621364 Change-Id: Ia292433ebd40d4c85ff6974def3d1f4b26926b52 --- .../android/graphics/drawable/Drawable.java | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/graphics/java/android/graphics/drawable/Drawable.java b/graphics/java/android/graphics/drawable/Drawable.java index cf5c563a81c5f..7f3a4373639b7 100644 --- a/graphics/java/android/graphics/drawable/Drawable.java +++ b/graphics/java/android/graphics/drawable/Drawable.java @@ -121,6 +121,47 @@ import java.util.Collection; * whose overall size is modified based on the current level. * * + * + *

Custom drawables

+ * + *

+ * All versions of Android allow the Drawable class to be extended and used at + * run time in place of framework-provided drawable classes. Starting in + * {@link android.os.Build.VERSION_CODES#N API 24}, custom drawables classes + * may also be used in XML. + *

+ * Note: Custom drawable classes are only accessible from + * within your application package. Other applications will not be able to load + * them. + *

+ * At a minimum, custom drawable classes must implement the abstract methods on + * Drawable and should override the {@link Drawable#draw(Canvas)} method to + * draw content. + *

+ * Custom drawables classes may be used in XML in multiple ways: + *

+ * *
*

Developer Guides

*

For more information about how to use drawables, read the