Skip to content

Custom font does not apply to RemoteViews in ongoing notification #28946

Open
@Mb8383

Description

@Mb8383

Description

I am using .NET MAUI to create an ongoing notification on Android. The notification's layout is defined using RemoteViews, and I am trying to apply a custom font to a TextView inside the RemoteViews.

However, the custom font is not applied at all — the text is always displayed using the default system font. I have verified that the font is correctly added to the project and works fine in normal MAUI views. The issue only occurs when setting the font in a RemoteViews layout used for a notification.

Steps to Reproduce:
Create a RemoteViews layout with a TextView.

Set a custom font using SetTypeface or a font family reference.

Display the RemoteViews as an ongoing notification.

Expected Behavior:
The TextView in the notification should display the text using the specified custom font.

Actual Behavior:
The custom font is ignored and the default system font is used instead.

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

10.0.0-preview.3

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

No response

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    s/needs-reproAttach a solution or code which reproduces the issuet/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions