Swipe down to close images
This commit is contained in:
parent
e0c118a73e
commit
9109eb36c1
@ -1,3 +1,7 @@
|
|||||||
|
- feat: Close images by swiping down
|
||||||
|
|
||||||
|
--------------------------------------------------------------------
|
||||||
|
|
||||||
**v122123641**
|
**v122123641**
|
||||||
|
|
||||||
- feat: Disable the failing source in the filter sheet.
|
- feat: Disable the failing source in the filter sheet.
|
||||||
@ -13,6 +17,7 @@
|
|||||||
- fix: NPE may be caused by the binding or the title that was null.
|
- fix: NPE may be caused by the binding or the title that was null.
|
||||||
- chore: Skip drone pipeline on changelog push.
|
- chore: Skip drone pipeline on changelog push.
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------
|
--------------------------------------------------------------------
|
||||||
|
|
||||||
**v122123621**
|
**v122123621**
|
||||||
|
@ -19,6 +19,7 @@ class ImageActivity : AppCompatActivity() {
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
binding = ActivityImageBinding.inflate(layoutInflater)
|
binding = ActivityImageBinding.inflate(layoutInflater)
|
||||||
val view = binding.root
|
val view = binding.root
|
||||||
|
binding.pager.requestDisallowInterceptTouchEvent(true)
|
||||||
|
|
||||||
setContentView(view)
|
setContentView(view)
|
||||||
|
|
||||||
|
@ -27,6 +27,11 @@ class ImageFragment : Fragment() {
|
|||||||
_binding = FragmentImageBinding.inflate(inflater, container, false)
|
_binding = FragmentImageBinding.inflate(inflater, container, false)
|
||||||
val view = binding?.root
|
val view = binding?.root
|
||||||
|
|
||||||
|
binding?.swipeRefreshLayout?.setProgressViewEndTarget(false, 0)
|
||||||
|
binding?.swipeRefreshLayout?.setOnRefreshListener {
|
||||||
|
activity?.finish()
|
||||||
|
}
|
||||||
|
|
||||||
binding!!.photoView.visibility = View.VISIBLE
|
binding!!.photoView.visibility = View.VISIBLE
|
||||||
Glide.with(requireActivity())
|
Glide.with(requireActivity())
|
||||||
.asBitmap()
|
.asBitmap()
|
||||||
|
@ -4,6 +4,11 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||||
|
android:id="@+id/swipeRefreshLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<com.github.chrisbanes.photoview.PhotoView
|
<com.github.chrisbanes.photoview.PhotoView
|
||||||
android:id="@+id/photoView"
|
android:id="@+id/photoView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -12,5 +17,6 @@
|
|||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:background="@drawable/checkerboard"
|
android:background="@drawable/checkerboard"
|
||||||
app:srcCompat="@android:drawable/screen_background_dark" />
|
app:srcCompat="@android:drawable/screen_background_dark" />
|
||||||
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
Loading…
Reference in New Issue
Block a user