From e08fc2604f118937646fa6224f8028e7bfa2664d Mon Sep 17 00:00:00 2001 From: davidoskky Date: Sat, 12 Dec 2020 18:49:51 +0100 Subject: [PATCH] Open one image on tap --- .../bou/readerforselfoss/fragments/ArticleFragment.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/fragments/ArticleFragment.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/fragments/ArticleFragment.kt index 9f9e2cc..3dfc3c8 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/fragments/ArticleFragment.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/fragments/ArticleFragment.kt @@ -533,7 +533,12 @@ class ArticleFragment : Fragment() { fun performClick(): Boolean { if (rootView!!.webcontent.hitTestResult.type == WebView.HitTestResult.IMAGE_TYPE || rootView!!.webcontent.hitTestResult.type == WebView.HitTestResult.SRC_IMAGE_ANCHOR_TYPE) { - //TODO: Add a way to show the image in full screen + //TODO: Transfer all images in the webpage to the Image fragment + var allImages = ArrayList() + allImages.add(rootView!!.webcontent.hitTestResult.extra.toString()) + val position : Int = 0 + + fragmentManager!!.beginTransaction().replace(R.id.reader_activity_view, ImageFragment.newInstance(position, allImages)).addToBackStack(null).commit() return true } return false