changeset 2736:09775418c776

Android: Use "View" as the type for the viewList instead of LinearLayout. LinearLayout prevented the ability to pack a scrollbox.... since the type for scrollbox is ScrollView instead of LinearLayout. This change would also likely be necessary when we get a separate GroupBox class.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 16 Dec 2021 14:48:52 +0000
parents 970cbcdb68f9
children 74b69da35e91
files android/DWindows.kt android/dw.cpp
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/android/DWindows.kt	Thu Dec 16 01:12:04 2021 +0000
+++ b/android/DWindows.kt	Thu Dec 16 14:48:52 2021 +0000
@@ -904,7 +904,7 @@
 val DWImageExts = arrayOf("", ".png", ".webp", ".jpg", ".jpeg", ".gif")
 
 class DWTabViewPagerAdapter : RecyclerView.Adapter<DWTabViewPagerAdapter.DWEventViewHolder>() {
-    val viewList = mutableListOf<LinearLayout>()
+    val viewList = mutableListOf<View>()
     val pageList = mutableListOf<Long>()
     val titleList = mutableListOf<String?>()
     var currentPageID = 0L
@@ -3446,7 +3446,7 @@
         }
     }
 
-    fun notebookPagePack(notebook: RelativeLayout, pageID: Long, box: LinearLayout)
+    fun notebookPagePack(notebook: RelativeLayout, pageID: Long, box: View)
     {
         waitOnUiThread {
             var pager: ViewPager2? = null
--- a/android/dw.cpp	Thu Dec 16 01:12:04 2021 +0000
+++ b/android/dw.cpp	Thu Dec 16 14:48:52 2021 +0000
@@ -5394,7 +5394,7 @@
         jclass clazz = _dw_find_class(env, DW_CLASS_NAME);
         // Get the method that you want to call
         jmethodID notebookPagePack = env->GetMethodID(clazz, "notebookPagePack",
-                                                      "(Landroid/widget/RelativeLayout;JLandroid/widget/LinearLayout;)V");
+                                                      "(Landroid/widget/RelativeLayout;JLandroid/view/View;)V");
         // Call the method on the object
         env->CallVoidMethod(_dw_obj, notebookPagePack, handle, (jlong)pageid, page);
         _dw_jni_check_exception(env);