Images are closed by swiping down, no graphical clue is given however.
Eventually I decided to use the SwipeRefreshLayout since it already implements the correct gesture, this way there's no need to implement a specific way to detect the gesture.
## Types of changes
- [x] I have read the **CONTRIBUTING** document.
- [x] My code follows the code style of this project.
- [x] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.
- [x] This is **NOT** translation related.
This is implements feature #13
Images are closed by swiping down, no graphical clue is given however.
Eventually I decided to use the SwipeRefreshLayout since it already implements the correct gesture, this way there's no need to implement a specific way to detect the gesture.
I agree, a graphical indication that the image will be closed would be proper.
I'm unsure how to introduce it though: the best thing would be an animation that shows the image closing.
I'll try to look into that already, I'm quite sure all libraries doing that are outdated, but I may find some easy way to do it.
I agree, a graphical indication that the image will be closed would be proper.
I'm unsure how to introduce it though: the best thing would be an animation that shows the image closing.
I'll try to look into that already, I'm quite sure all libraries doing that are outdated, but I may find some easy way to do it.
Alright, I found an easy way to animate it. It's simple and it works fairly well with the viewpager as well. While dragging down the image it shrinks towards the bottom of the screen and then it closes and you're back to the article. This does not happen if you zoomed into the image, so you're safe to drag it around. The only thing is that while dragging down the image you get a white background, which isn't very nice.
I'll check if it is possible to have the article itself as background when that's happening, but I figure it could be complex and I might have to move the image fragments to be instantiated in the article fragment itself. Thus, if that's too complex I guess this could be merged as is, it currently works fine.
Alright, I found an easy way to animate it. It's simple and it works fairly well with the viewpager as well. While dragging down the image it shrinks towards the bottom of the screen and then it closes and you're back to the article. This does not happen if you zoomed into the image, so you're safe to drag it around. The only thing is that while dragging down the image you get a white background, which isn't very nice.
I'll check if it is possible to have the article itself as background when that's happening, but I figure it could be complex and I might have to move the image fragments to be instantiated in the article fragment itself. Thus, if that's too complex I guess this could be merged as is, it currently works fine.
Alright, this is finished. The image can be swiped down to be closed and there is no interference with the viewpager or the zooming of the image. When swiping down, the image resizes to a small square at the bottom of the screen, completing the animation the activity closes, otherwise the image animates back to full screen automatically.
When swiping down, the article is visible in the background, slightly obscured by a dark color.
I have found no other major usability issues. I've been playing around with it for a while. It happened to me once that the animation stopped in the middle, tapping on the image made it start again, I was unable to reproduce this however. It is possible to swipe the image down mid way, stop swiping and start swiping horizontally to change image while it is not full screen; this doesn't appear to me as a big issue since it is not impeding the usability of the functionalities.
Alright, this is finished. The image can be swiped down to be closed and there is no interference with the viewpager or the zooming of the image. When swiping down, the image resizes to a small square at the bottom of the screen, completing the animation the activity closes, otherwise the image animates back to full screen automatically.
When swiping down, the article is visible in the background, slightly obscured by a dark color.
I have found no other major usability issues. I've been playing around with it for a while. It happened to me once that the animation stopped in the middle, tapping on the image made it start again, I was unable to reproduce this however. It is possible to swipe the image down mid way, stop swiping and start swiping horizontally to change image while it is not full screen; this doesn't appear to me as a big issue since it is not impeding the usability of the functionalities.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Types of changes
This is implements feature #13
Images are closed by swiping down, no graphical clue is given however.
Eventually I decided to use the SwipeRefreshLayout since it already implements the correct gesture, this way there's no need to implement a specific way to detect the gesture.
9109eb36c1to1f7a47c614@@ -1,3 +1,7 @@- feat: Close images by swiping downThis will be generated automatically. Can you please remove this ?
Sure, there you go
1f7a47c614to2b6659f4ecI'm not sure if anyone will discover this feature if there is no way to tell if the image is being closed.
I can't merge this like this.
I agree, a graphical indication that the image will be closed would be proper.
I'm unsure how to introduce it though: the best thing would be an animation that shows the image closing.
I'll try to look into that already, I'm quite sure all libraries doing that are outdated, but I may find some easy way to do it.
Alright, I found an easy way to animate it. It's simple and it works fairly well with the viewpager as well. While dragging down the image it shrinks towards the bottom of the screen and then it closes and you're back to the article. This does not happen if you zoomed into the image, so you're safe to drag it around. The only thing is that while dragging down the image you get a white background, which isn't very nice.
I'll check if it is possible to have the article itself as background when that's happening, but I figure it could be complex and I might have to move the image fragments to be instantiated in the article fragment itself. Thus, if that's too complex I guess this could be merged as is, it currently works fine.
It isn't reliable. You can see how weirdly it works on the video attached.
Damn, I didn't have this happening to me before. I'll try reproducing that.
Alright, this is finished. The image can be swiped down to be closed and there is no interference with the viewpager or the zooming of the image. When swiping down, the image resizes to a small square at the bottom of the screen, completing the animation the activity closes, otherwise the image animates back to full screen automatically.
When swiping down, the article is visible in the background, slightly obscured by a dark color.
I have found no other major usability issues. I've been playing around with it for a while. It happened to me once that the animation stopped in the middle, tapping on the image made it start again, I was unable to reproduce this however. It is possible to swipe the image down mid way, stop swiping and start swiping horizontally to change image while it is not full screen; this doesn't appear to me as a big issue since it is not impeding the usability of the functionalities.
Just tested it, it works pretty good.
I'll review the code, now, and merge as soon as everything is closed.
@@ -4,6 +4,7 @@ import android.os.Bundleimport android.view.LayoutInflaterimport android.view.Viewimport android.view.ViewGroupimport androidx.constraintlayout.motion.widget.MotionLayoutThis may be removed.
@@ -34,0 +34,4 @@val transitionListener = object : MotionLayout.TransitionListener {override fun onTransitionStarted(motionLayout: MotionLayout?, startId: Int, endId: Int) {binding.root.setOnClickListener {Is this needed ?
Ops, sorry didn't even notice that...
@@ -34,0 +34,4 @@val transitionListener = object : MotionLayout.TransitionListener {override fun onTransitionStarted(motionLayout: MotionLayout?, startId: Int, endId: Int) {binding.root.setOnClickListener {Is this needed ?
I just checked again, if any of those definitions is removed the build fails.
I meant the empty onclick listener
I'll merge as soon as everything is ok