LemmyNet / jerboa

A native android app for Lemmy
GNU Affero General Public License v3.0
1.14k stars 166 forks source link

Fix Loading bar clipping behind content #1540

Closed MV-GH closed 2 weeks ago

MV-GH commented 3 weeks ago

Fixes #1539

The MarkdownView seems to render later causing it, to be drawn over the loading bar. A simple zindex fixes this.

image

Also noticed this

This overload of AndroidView does not automatically pool or reuse Views. If placed inside of a reusable container (including inside a LazyRow or LazyColumn), the View instances will always be discarded and recreated if the composition hierarchy containing the AndroidView changes, even if its group structure did not change and the View could have conceivably been reused. To opt-in for View reuse, call the overload of AndroidView that accepts an onReset callback, and provide a non-null implementation for this callback. Since it is expensive to discard and recreate View instances, reusing Views can lead to noticeable performance improvements — especially when building a scrolling list of AndroidViews. It is highly recommended to opt-in to View reuse when possible. AndroidView will not clip its content to the layout bounds. Use View. setClipToOutline on the child View to clip the contents, if desired. Developers will likely want to do this with all subclasses of SurfaceView to keep its contents contained.

I'll play around with it when I have some time.