瀏覽代碼

PDFTool(Android) - 优化在flutter中使用问题

ComPDFKit-Youna 9 月之前
父節點
當前提交
e501eb2aea

+ 4 - 4
ComPDFKit_Tools/build.gradle

@@ -50,10 +50,10 @@ android {
 dependencies {
 
     api fileTree(include: ['*.jar','*.aar'], dir: 'libs')
-    api project(path:':ComPDFKit_Repo:compdfkit')
-    api project(path:':ComPDFKit_Repo:compdfkit-ui')
-//    api ('com.compdf:compdfkit:2.0.0')
-//    api ('com.compdf:compdfkit-ui:2.0.0')
+//    api project(path:':ComPDFKit_Repo:compdfkit')
+//    api project(path:':ComPDFKit_Repo:compdfkit-ui')
+    api ('com.compdf:compdfkit:2.0.1')
+    api ('com.compdf:compdfkit-ui:2.0.1')
     api 'com.github.bumptech.glide:glide:4.15.1'
     annotationProcessor 'com.github.bumptech.glide:compiler:4.15.1'
     api 'androidx.documentfile:documentfile:1.0.1'

+ 1 - 1
ComPDFKit_Tools/src/main/assets/tools_default_configuration.json

@@ -256,6 +256,6 @@
     "pageSameWidth": true
   },
   "global" : {
-    "themeMode" : "dark"
+    "themeMode" : "system"
   }
 }

+ 5 - 0
ComPDFKit_Tools/src/main/java/com/compdfkit/tools/common/pdf/CPDFDocumentFragment.java

@@ -24,6 +24,7 @@ import android.os.Build;
 import android.os.Bundle;
 import android.os.Environment;
 import android.text.TextUtils;
+import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -56,6 +57,7 @@ import com.compdfkit.tools.common.utils.activitycontracts.CSelectPDFDocumentResu
 import com.compdfkit.tools.common.utils.annotation.CPDFAnnotationManager;
 import com.compdfkit.tools.common.utils.dialog.CAlertDialog;
 import com.compdfkit.tools.common.utils.threadpools.CThreadPoolUtils;
+import com.compdfkit.tools.common.utils.viewutils.CViewUtils;
 import com.compdfkit.tools.common.utils.window.CPopupMenuWindow;
 import com.compdfkit.tools.common.views.CPDFToolBar;
 import com.compdfkit.tools.common.views.directory.CFileDirectoryDialog;
@@ -789,12 +791,15 @@ public class CPDFDocumentFragment extends CBasicPDFFragment {
     }
 
     protected interface CRequestPermissionListener {
+
         void request();
     }
 
     @Override
     public void onDestroy() {
         try {
+            CViewUtils.hideKeyboard(getActivity().getWindow().getDecorView());
+            Log.e("ComPDFKit", "CPDFDocumentFragment:onDestroy() document close()");
             if (pdfView.getCPdfReaderView().getPDFDocument() != null) {
                 pdfView.getCPdfReaderView().getPDFDocument().close();
             }

+ 1 - 1
compdfkit-tools-mavencentral.gradle

@@ -1,7 +1,7 @@
 apply plugin: 'maven-publish'
 apply plugin: 'signing'
 
-def PUBLISH_VERSION = '2.0.1'
+def PUBLISH_VERSION = '2.0.2-SNAPSHOT'
 def PUBLISH_GROUP_ID = 'com.compdf'
 def PUBLISH_ARTIFACT_ID = 'compdfkit-tools'