Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor:update version 3.3.1 #256

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-keep class com.shockwave.**
-keep class com.shockwave.** { *; }
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
import io.flutter.plugin.common.MethodChannel.Result;
import io.flutter.plugin.platform.PlatformView;
import android.graphics.Color;

import java.io.File;
import java.util.HashMap;
Expand All @@ -35,7 +36,7 @@ public class FlutterPDFView implements PlatformView, MethodCallHandler {

methodChannel = new MethodChannel(messenger, "plugins.endigo.io/pdfview_" + id);
methodChannel.setMethodCallHandler(this);

pdfView.setBackgroundColor(Color.LTGRAY);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about dark mode color?

linkHandler = new PDFLinkHandler(context, pdfView, methodChannel, preventLinkNavigation);

Configurator config = null;
Expand All @@ -59,8 +60,10 @@ else if (params.get("pdfData") != null) {
.pageSnap(getBoolean(params, "pageSnap"))
.pageFitPolicy(getFitPolicy(params))
.enableAnnotationRendering(true)
.linkHandler(linkHandler).
enableAntialiasing(false)
.linkHandler(linkHandler)
.linkHandler(linkHandler)
Comment on lines +63 to +64
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove one of them

.spacing(10)
.enableAntialiasing(false)
// .fitEachPage(getBoolean(params,"fitEachPage"))
.onPageChange(new OnPageChangeListener() {
@Override
Expand Down
17 changes: 13 additions & 4 deletions ios/Classes/FlutterPDFView.m
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,22 @@ - (instancetype)initWithFrame:(CGRect)frame

if (@available(iOS 11.0, *)) {
UIScrollView *_scrollView;

for (id subview in _pdfView.subviews) {
for (id subview in _pdfView.subviews) {
if ([subview isKindOfClass: [UIScrollView class]]) {
_scrollView = subview;
}
} else {
for (UIView *subsubview in [subview subviews]) {
if ([subsubview isKindOfClass:[UIScrollView class]]) {
_scrollView = (UIScrollView *)subsubview;
}
}
}
}
if (_scrollView != NULL) {
_scrollView.showsVerticalScrollIndicator = false;
_scrollView.showsHorizontalScrollIndicator = false;
}

_scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
if (@available(iOS 13.0, *)) {
_scrollView.automaticallyAdjustsScrollIndicatorInsets = NO;
Expand Down