Search code examples
androidtextwebviewsize

Android: How to make double width and double height text in webview content


I want to show some content on Android webview which is related to receipt printing content I want to show 2x width (or double width) and 2x height (or double height) text for few lines Can someone help? See example imageenter image description here


Solution

  • afaik you can only set up font size (through WebSettings class)... WebView isn't so elastic and doesn't provide such detailed options for managing/styling printed text. for this purposes CSS is made for. eventually it would be better to implement this feature in Javascript on web-side or downloading data as clear text, modify proper lines (adding CSS) and use loadData(...) method of WebView