fluttercommunity / fluttercommunity/flutter_webview_plugin

Enabling an option to ignore system font setting for the webview in Android

Ouverte
#895 1 commentaire 4 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Java
Étoiles
1.5k
Forks
938
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

## Use case

I am currently facing a limitation with flutter_webview_plugin in Android.
When user changes font size on their device (Settings -> Accessibility -> Font Size), webview uses this adjusted font size.
That results overlapping texts and layouts of the content being incorrect.
So I need the webview to ignore the system font settings and load webview with specified font sizes in HTML/CSS.

## Proposal

The font size setting in Settings on user device affects the textZoom property of the webview.
In Android webview there is property we can set to force webview to display text in original sizes (specified in html/css of the web).

webView.getSettings().setTextZoom(100);

I am suggesting to add that property into the webview plugin. If there is any event that system font size must be used for webview as well, Please define a new setting in the WebviewScaffold to enable or disable this property.

eg: withTextZoom : true

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Localisez la configuration Android WebView derrière WebviewScaffold et examinez la manière dont ses paramètres sont exposés. Utilisez le comportement proposé de textZoom comme point de départ et définissez ce que le nouveau paramètre doit faire lorsqu’il est activé ou désactivé. Le travail est terminé lorsque le plugin expose l’option et que le comportement de WebView est cohérent avec le paramètre choisi.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
android, css, flutter, html, java
Domaine
mobile, web-dev
Type d'issue
Fonctionnalité
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.