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

Make PdfView use PdfUiFragment instead of PdfFragment #322

Merged
merged 7 commits into from
Jan 30, 2020

Conversation

irgendeinich
Copy link
Contributor

@irgendeinich irgendeinich commented Oct 31, 2019

Details

Hold until 6.1.0 is shipped as this is using unreleased APIs.

Resolves #245

This makes the PdfView use our PdfUiFragment instead of the PdfFragment. This means the we now provide the full PdfActivity experience when using the PSPDFKitView on Android, matching what iOS does.

If you want to continue to use the PSPDFKitView without a toolbar using userInterfaceViewMode: alwaysHidden in the configuration will hide the toolbar.

This should work without any additional changes in most apps. The only exception being apps that require multiple PSPDFKitView in the view hierarchy at the same time, this is no longer supported due to only one PdfUiFragment being allowed to exist per Activity. If this is a use case you need please ping us here and let us know. This way we know if there is a need to address this.

device-2019-10-31-181221

Acceptance Criteria

  • When approved, right before merging, rebase with master and increment the package version in package.json, package-lock.json, and samples/Catalog/package.json (see example commit: 1bf805f).
  • Create a new release (and tag) with the new package version (see https://github.com/PSPDFKit/react-native/releases).

pdfFragment.addOnAnnotationEditingModeChangeListener(pdfViewModeController);
pdfFragment.addOnFormElementEditingModeChangeListener(pdfViewModeController);
// To prevent listeners from being attached multiple times we clean them before attaching them.
pdfFragment.removeOnTextSelectionModeChangeListener(pdfViewModeController);
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this already guarded by the ListenerCollection?

@irgendeinich irgendeinich merged commit c0c3dd9 into master Jan 30, 2020
@irgendeinich irgendeinich deleted the reinhard/pdfui-fragment branch January 30, 2020 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Android] Native UI Component does not render the Toolbar
3 participants