Skip to content

Ui elements of Webviews have white backgrounds instead of transparent. #2381

@johndoe235

Description

@johndoe235

Description of the bug:

  1. Open a website with MSAL webview.
  2. Observe native webview elements
  3. See that they have white background instead of transparent one( copy, paste, zoom buttons)

Video of issue

webview_broken_theme.mov

Cause:

This is caused by refactoring of the DualScreenActivity in 7.0.0.
Specifically you programatically set a theme that is broken by design making it almost impossible to fix on the user side.

 protected int getThemeResId() {
        return R.style.DualScreenActivityTheme;
    }

 <style name="DualScreenActivityTheme" parent="Theme.AppCompat.Light">
        <item name="android:background">@color/com_microsoft_identity_common_white</item>
    </style>

This background color is used by the webview making it draw it's elements with a white background instead of a

Correct steps for fixing.

-android:background needs to be transparent
-Try to abstain from programatically setting themes. If you want to use a theme put it in the manifest so that a user can easily override it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions