From ad7eb44f1461b0a5724864f15f09778aa254a633 Mon Sep 17 00:00:00 2001 From: Tamas Kozmer Date: Mon, 2 Jan 2023 13:52:47 +0100 Subject: [PATCH 1/3] Updated version. --- apps/student/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/student/build.gradle b/apps/student/build.gradle index f00a8e1d9c..ff77b65881 100644 --- a/apps/student/build.gradle +++ b/apps/student/build.gradle @@ -55,8 +55,8 @@ android { applicationId "com.instructure.candroid" minSdkVersion Versions.MIN_SDK targetSdkVersion Versions.TARGET_SDK - versionCode = 245 - versionName = '6.21.1' + versionCode = 246 + versionName = '6.21.2' vectorDrawables.useSupportLibrary = true multiDexEnabled = true From a37b2b1da71edef31e00a79eb894ba1761a64e38 Mon Sep 17 00:00:00 2001 From: Tamas Kozmer <72397075+tamaskozmer@users.noreply.github.com> Date: Mon, 2 Jan 2023 15:58:32 +0100 Subject: [PATCH 2/3] [Student][Teacher][MBL-16441][MBL-16442] CanvasWebViewWrapper issues #1819 refs: MBL-16441, MBL-16442 affects: Student release note: Fixed an issue where classic quizzes wouldn't load. Fixed an issue where the keyboard is not opening for web forms. --- .../mobius/assignmentDetails/ui/AssignmentDetailsView.kt | 3 +++ .../com/instructure/pandautils/views/CanvasWebViewWrapper.kt | 5 +++++ .../src/main/res/layout/view_canvas_web_view_wrapper.xml | 2 -- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/student/src/main/java/com/instructure/student/mobius/assignmentDetails/ui/AssignmentDetailsView.kt b/apps/student/src/main/java/com/instructure/student/mobius/assignmentDetails/ui/AssignmentDetailsView.kt index 88abbe0d42..ccc687bb4c 100644 --- a/apps/student/src/main/java/com/instructure/student/mobius/assignmentDetails/ui/AssignmentDetailsView.kt +++ b/apps/student/src/main/java/com/instructure/student/mobius/assignmentDetails/ui/AssignmentDetailsView.kt @@ -158,6 +158,9 @@ class AssignmentDetailsView( override fun shouldLaunchInternalWebViewFragment(url: String): Boolean = true } + + descriptionWebViewWrapper.webView.focusable = View.NOT_FOCUSABLE + descriptionWebViewWrapper.webView.isFocusableInTouchMode = false } override fun render(state: AssignmentDetailsViewState) { diff --git a/libs/pandautils/src/main/java/com/instructure/pandautils/views/CanvasWebViewWrapper.kt b/libs/pandautils/src/main/java/com/instructure/pandautils/views/CanvasWebViewWrapper.kt index 47387a5de6..200ada6f85 100644 --- a/libs/pandautils/src/main/java/com/instructure/pandautils/views/CanvasWebViewWrapper.kt +++ b/libs/pandautils/src/main/java/com/instructure/pandautils/views/CanvasWebViewWrapper.kt @@ -61,6 +61,11 @@ class CanvasWebViewWrapper @JvmOverloads constructor( onThemeChanged(themeSwitched, html) } } + + val layoutParams = LinearLayout.LayoutParams(context, attrs) + val webViewLayoutParams = binding.contentWebView.layoutParams + webViewLayoutParams.height = layoutParams.height + binding.contentWebView.layoutParams = webViewLayoutParams } private fun changeButtonTheme() { diff --git a/libs/pandautils/src/main/res/layout/view_canvas_web_view_wrapper.xml b/libs/pandautils/src/main/res/layout/view_canvas_web_view_wrapper.xml index ea1053d57e..595291f683 100644 --- a/libs/pandautils/src/main/res/layout/view_canvas_web_view_wrapper.xml +++ b/libs/pandautils/src/main/res/layout/view_canvas_web_view_wrapper.xml @@ -63,8 +63,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/backgroundLightest" - android:focusable="false" - android:focusableInTouchMode="false" android:minHeight="48dp" android:scrollbars="none" /> From 20cf5cfec8b0fed7b30e6c1f3e951f284dcdc20a Mon Sep 17 00:00:00 2001 From: Tamas Kozmer Date: Mon, 2 Jan 2023 16:35:47 +0100 Subject: [PATCH 3/3] Fixed page details screen. --- .../instructure/student/fragment/PageDetailsFragment.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/student/src/main/java/com/instructure/student/fragment/PageDetailsFragment.kt b/apps/student/src/main/java/com/instructure/student/fragment/PageDetailsFragment.kt index 42879dd2e3..f9ca978a8f 100644 --- a/apps/student/src/main/java/com/instructure/student/fragment/PageDetailsFragment.kt +++ b/apps/student/src/main/java/com/instructure/student/fragment/PageDetailsFragment.kt @@ -19,6 +19,7 @@ package com.instructure.student.fragment import android.os.Bundle import android.view.MenuItem import android.view.View +import android.view.ViewGroup import android.webkit.WebView import com.instructure.canvasapi2.managers.OAuthManager import com.instructure.canvasapi2.managers.PageManager @@ -125,6 +126,12 @@ class PageDetailsFragment : InternalWebviewFragment(), Bookmarkable { } } } + + val layoutParams = getCanvasWebView()?.layoutParams + layoutParams?.let { + it.height = ViewGroup.LayoutParams.WRAP_CONTENT + getCanvasWebView()?.layoutParams = it + } } override fun onOptionsItemSelected(item: MenuItem): Boolean {