Tiim / Android-Markdown-Widget

Small widget app to display a markdown file on the home screen
GNU General Public License v3.0
83 stars 10 forks source link

Scroll down to show more text #5

Open ooker777 opened 2 years ago

ooker777 commented 2 years ago

Is it possible to do so?

Tiim commented 2 years ago

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.

Balibaloo commented 1 year ago

+1 Would be a great feature

Aonodensetsu commented 11 months ago

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

Mick2nd commented 2 months ago

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.

suppergit commented 1 day ago

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