leonlatsch / Photok

Encrypted Photo Safe for Android
Apache License 2.0
430 stars 45 forks source link

[Feature] Slideshow #162

Open alxgnon opened 2 years ago

alxgnon commented 2 years ago

I would like to be able to view pictures in a slideshow.

yuno-tw commented 4 months ago

I am trying to implement this feature using jetpack compose. What is the stance regarding experimental Material3 Composables like TopAppBar?

leonlatsch commented 4 months ago

@yuno-tw Go for it. They seem pretty stable

yuno-tw commented 3 months ago

Little update on this one. I ended up with something like an compose version of the image viewer, which does not yet display images but colored boxes with their uuid. Since you mentioned somewhere, that you wanted to introduce a new way of loading the images (coil I think) I'll probably wait until that happens. Also I weren't able to figure out a good way of fading between the images while still allowing for scrolling to continue in the slide show.

leonlatsch commented 3 months ago

Thinking about this. Since the image viewer also needs a compose overhaul. Might aswell build this feature into the new image viewer when its done.

Or you could adapt your code to replace the image viewer and add a button somewhere to start a slideshow that would just start it inside the image viewer. WDYT?

Also: For loading images in compose with coil, there is a new way since the new gallery already uses it: Have a look at the new gallery. Use LocalEncryptedImageLoader and rememberEncryptedImagePainter.

At the compose root, provide the EncryptedImageLoader to the composition local. Then use the remember method like in the new gallery.

yuno-tw commented 3 months ago

Using my current progress as image view would be possible (That said I'm new to the whole android and compose eco system, I have mainly worked with flutter before. So the code quality might not be that good.)

When it comes to the slide show part, I'm not sure yet whether it could be integrated into the image viewer directly. That depends on the solution I find for the fading transition.

But as a first step I'll try to integrate the image loading as you described. I might open a draft PR when that is done.