-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
cp: approvedApproved cherry-pick requestApproved cherry-pick request
Description
issue_link
Commit Hash
Target
beta
pr_link
Impacted Users
Customers and plugins using Android Platform Views
Impact Description
On Android versions below 29, platform views struggle to render when the background is transparent:

Workaround
Any plugin or app that uses platform views could switch to Hybrid Composition when the background is made transparent.
Risk
low
Test Coverage
yes
Validation Steps
- Build a custom engine that changes:
canvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR);
to
canvas.drawColor(Color.TRANSPARENT);
-
Create a Flutter app with webview_flutter. The example app from the plugin also works: webview_flutter example app
-
Set the background to transparent: https://github.com/flutter/plugins/blob/main/packages/webview_flutter/webview_flutter_android/example/lib/main.dart#L137
-
Create and start an Android emulator as Nexus 4 API 28.
-
Run the app and navigate through any webpage.
-
Compare the result to adding the
PorterDuff.Mode.CLEARparameter in step 1.
Metadata
Metadata
Assignees
Labels
cp: approvedApproved cherry-pick requestApproved cherry-pick request