[Android] Implement LayerDrawableCompat and createLayerDrawable
This CL adds ApiCompatibilityUtils.createLayerDrawable and LayerDrawableCompat. createLayerDrawable creates LayerDrawableCompat on Android K and earlier versions and falls back to regular LayerDrawable on newer versions. LayerDrawableCompat overrides mutate() method to work around an issue in LayerDrawable.mutate() when the bounds of child drawables aren't properly copied during the mutation. This issue would force ImageView to appear empty if it contains a LayerDrawable and this drawable is mutated. Bug: 890317 Change-Id: I3479a304917df1873645ccfda7102475981eff5b Reviewed-on: https://chromium-review.googlesource.com/1251544Reviewed-by:Ted Choc <tedchoc@chromium.org> Reviewed-by:
Yaron Friedman <yfriedman@chromium.org> Commit-Queue: Boris Sazonov <bsazonov@chromium.org> Cr-Commit-Position: refs/heads/master@{#595161}
Showing
Please register or sign in to comment