Skip to content
Commit 5a22b408 authored by Nader Jawad's avatar Nader Jawad
Browse files

Added line to mark the mGradientIsDirty flag to true in order to

recompute GradientDrawable drawing bounds

Updated logic in GradientDrawable#setStrokeInternal to set the
mGradientIsDirty flag to true when the stroke is changed in order to
have ensureValidRect be called and recompute the drawing bounds
configured on mRect. In the event that a stroke width is defined, the
drawing rect must be inset by half the stroke width. Otherwise the
stroke will be drawn at the edges of the boundary and be clipped.

Bug: 70915849
Test: Ran test app provided in bug and confirmed that modifying the
strokeWidth on a pre-existing GradientDrawable matches the behavior of a
brand new GradientDrawable instance used as the background on a view

Change-Id: Icaa53d936589a9b4790f89e894f1d745c6e4fe43
parent 424c84ce
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment