hotwired / turbo-android

Android framework for making Turbo native apps
MIT License
408 stars 51 forks source link

Prevent web page screenshot scaling down in some cases #267

Closed mbarta closed 1 year ago

mbarta commented 1 year ago

Fixes #206:

... when you have an input field in a bottom modal sheet and you focus on it to type, the viewport for the page behind the modal shrinks a bit ...

It does so by changing the scaleType of the ImageView that holds a screenshot of a detached WebView page to matrix. Not setting any value programmatically leaves the image unchanged even when the height of the ImageView changes (due to the keyboard popping up).