From aacd1ba6a7a9bb9d84da9b8bbacf284000867bb3 Mon Sep 17 00:00:00 2001 From: Kevin Hufnagle Date: Mon, 26 Sep 2016 19:28:37 -0700 Subject: [PATCH] docs: Fixed attribute mismatch between XML and Java code samples for a "Clip" drawable. Both code samples now reference the clip drawable itself as an ImageView object's background, not its drawable. Bug: 31658431 Change-Id: If42cf877ba151e989c344a591a642116979f56d1 --- docs/html/guide/topics/resources/drawable-resource.jd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/html/guide/topics/resources/drawable-resource.jd b/docs/html/guide/topics/resources/drawable-resource.jd index aae0cbae99b3..4587ae4ec5db 100644 --- a/docs/html/guide/topics/resources/drawable-resource.jd +++ b/docs/html/guide/topics/resources/drawable-resource.jd @@ -1270,7 +1270,7 @@ the right edge, a right gravity clips the left edge, and neither clips both edge progressively reveal the image:

 ImageView imageview = (ImageView) findViewById(R.id.image);
-ClipDrawable drawable = (ClipDrawable) imageview.getDrawable();
+ClipDrawable drawable = (ClipDrawable) imageview.getBackground();
 drawable.setLevel(drawable.getLevel() + 1000);
 
-- 2.11.0