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
This commit is contained in:
Kevin Hufnagle
2016-09-26 19:28:37 -07:00
parent a15c471ee5
commit aacd1ba6a7

View File

@@ -1270,7 +1270,7 @@ the right edge, a right gravity clips the left edge, and neither clips both edge
progressively reveal the image:</p>
<pre>
ImageView imageview = (ImageView) findViewById(R.id.image);
ClipDrawable drawable = (ClipDrawable) imageview.getDrawable();
ClipDrawable drawable = (ClipDrawable) imageview.getBackground();
drawable.setLevel(drawable.getLevel() + 1000);
</pre>