|
@@ -17,8 +17,6 @@ import static com.compdfkit.tools.contenteditor.CEditToolbar.SELECT_AREA_TEXT;
|
|
|
import android.Manifest;
|
|
|
import android.content.Context;
|
|
|
import android.content.Intent;
|
|
|
-import android.content.pm.PackageInfo;
|
|
|
-import android.content.pm.PackageManager;
|
|
|
import android.content.res.Configuration;
|
|
|
import android.graphics.Paint;
|
|
|
import android.net.Uri;
|
|
@@ -27,7 +25,6 @@ import android.os.Bundle;
|
|
|
import android.os.Environment;
|
|
|
import android.provider.Settings;
|
|
|
import android.text.TextUtils;
|
|
|
-import android.util.Log;
|
|
|
import android.view.LayoutInflater;
|
|
|
import android.view.View;
|
|
|
import android.view.ViewGroup;
|
|
@@ -55,7 +52,6 @@ import com.compdfkit.tools.common.contextmenu.CPDFContextMenuHelper;
|
|
|
import com.compdfkit.tools.common.pdf.config.CPDFConfiguration;
|
|
|
import com.compdfkit.tools.common.pdf.config.ToolbarConfig;
|
|
|
import com.compdfkit.tools.common.utils.CFileUtils;
|
|
|
-import com.compdfkit.tools.common.utils.CLog;
|
|
|
import com.compdfkit.tools.common.utils.CPermissionUtil;
|
|
|
import com.compdfkit.tools.common.utils.CToastUtil;
|
|
|
import com.compdfkit.tools.common.utils.activitycontracts.CSelectPDFDocumentResultContract;
|
|
@@ -95,7 +91,6 @@ import com.compdfkit.ui.reader.CPDFReaderView;
|
|
|
|
|
|
import java.io.File;
|
|
|
import java.util.ArrayList;
|
|
|
-import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
@@ -361,6 +356,11 @@ public class CPDFDocumentFragment extends CBasicPDFFragment {
|
|
|
ToolbarConfig toolbarConfig = cpdfConfiguration.toolbarConfig;
|
|
|
for (ToolbarConfig.ToolbarAction androidAvailableAction : toolbarConfig.androidAvailableActions) {
|
|
|
switch (androidAvailableAction) {
|
|
|
+ case Back:
|
|
|
+ pdfToolBar.addBackPressedAction(v -> {
|
|
|
+ onBackPressedCallback.handleOnBackPressed();
|
|
|
+ });
|
|
|
+ break;
|
|
|
case Thumbnail:
|
|
|
pdfToolBar.addAction(R.drawable.tools_ic_thumbnail, v -> showPageEdit(pdfView, false, () -> {
|
|
|
if (curEditMode > CPDFEditPage.LoadNone && pdfToolBar.getMode() == CPreviewMode.Edit) {
|
|
@@ -414,7 +414,6 @@ public class CPDFDocumentFragment extends CBasicPDFFragment {
|
|
|
dialogFragment.show(getChildFragmentManager(), "annotationList");
|
|
|
});
|
|
|
break;
|
|
|
-
|
|
|
case Menu:
|
|
|
pdfToolBar.addAction(R.drawable.tools_ic_more, this::showToolbarMenuDialog);
|
|
|
break;
|