Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Android: Support setting background color on ARTSurfaceView
Summary: This fixes support for the `backgroundColor` style prop on an `ART.Surface`. `ARTSurfaceViewManager` inherits its `setBackgroundColor` implementation from `BaseViewManager`. This implementation broke in API 24 because API 24 removed support for `setBackgroundColor`on `TextureViews`. `ARTSurfaceView` inherits from `TextureView` so it also lost support for `setBackgroundColor`. To fix this, the implementation of `ART.Surface's` `setBackgroundColor` was moved to the shadow node. The implementation now draws the background color on the canvas. In a test app, verified that initializing and changing the background color on an `ART.Surface` works. Verified that the background renders as transparent when a background color isn't set. Also, this change is being used in my team's app. Adam Comella Microsoft Corp. Closes #14117 Differential Revision: D5419574 Pulled By: hramos fbshipit-source-id: 022bfed553e33e2d493f68b4bf5aa16dd304934d
- Loading branch information