Android-Markdown-Widget icon indicating copy to clipboard operation
Android-Markdown-Widget copied to clipboard

Scroll down to show more text

Open ooker777 opened this issue 3 years ago • 5 comments

Is it possible to do so?

ooker777 avatar Aug 20 '22 07:08 ooker777

It should be possible. Currently the markdown gets rendered into an image with the same size in pixels as the widget, and only this image gets displayed.

If I find a way to calculate how tall this image should be to fit the entire document, then it should be possible to make the widget scrollable.

Tiim avatar Aug 23 '22 09:08 Tiim

+1 Would be a great feature

Balibaloo avatar Jul 22 '23 10:07 Balibaloo

quick math here: android default line height is 19sp (scalable pixels), so count "\n" and line wraps and multiply by 19sp for image height

Aonodensetsu avatar Sep 22 '23 16:09 Aonodensetsu

My newest version of the pull request can scroll the content. It does this by dividing a larger Bitmap into stripes serving as items for a List View.

Disadvantage: my PR does not let any stone on the other. Either you use this or you must take the burden of transferring selected parts of the functionality.

Mick2nd avatar Jun 25 '24 15:06 Mick2nd

Maybe you can refer to this project, https://github.com/Irony95/ObsidianAndroidWidget, this widget can scroll down to show the text.

suppergit avatar Sep 01 '24 09:09 suppergit