Skip to content

Commit cb60af3

Browse files
author
irgendeinich
committed
Bump Android SDK Version to 5.5.0
Fix typo in readme
1 parent 35fde5b commit cb60af3

File tree

5 files changed

+15
-4
lines changed

5 files changed

+15
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ Shows the pdf `document` from the local device filesystem, or your app's assets.
654654
655655
### Windows UWP
656656
657-
Windows UWP is not currently supported, the following integration steps are for wrapper verision [1.24.9](https://github.com/PSPDFKit/react-native/releases/tag/1.24.9).
657+
Windows UWP is not currently supported, the following integration steps are for wrapper version [1.24.9](https://github.com/PSPDFKit/react-native/releases/tag/1.24.9).
658658
659659
#### Requirements
660660

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Contains gradle configuration constants
33
*/
44
ext {
5-
PSPDFKIT_VERSION = '5.4.2'
5+
PSPDFKIT_VERSION = '5.5.0'
66
}
77

88
buildscript {

android/src/main/java/com/pspdfkit/react/ConfigurationAdapter.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
package com.pspdfkit.react;
1515

1616
import android.content.Context;
17+
1718
import androidx.annotation.NonNull;
1819
import androidx.annotation.Nullable;
1920

@@ -44,6 +45,8 @@ public class ConfigurationAdapter {
4445
private static final String SHOW_THUMBNAIL_BAR = "showThumbnailBar";
4546
private static final String SHOW_THUMBNAIL_BAR_DEFAULT = "default";
4647
private static final String SHOW_THUMBNAIL_BAR_SCROLLABLE = "scrollable";
48+
private static final String SHOW_THUMBNAIL_BAR_FLOATING = "floating";
49+
private static final String SHOW_THUMBNAIL_BAR_PINNED = "pinned";
4750
private static final String SHOW_THUMBNAIL_BAR_NONE = "none";
4851
private static final String SHOW_THUMBNAIL_GRID_ACTION = "showThumbnailGridAction";
4952
private static final String SHOW_OUTLINE_ACTION = "showOutlineAction";
@@ -217,6 +220,10 @@ private void configureShowThumbnailBar(String showThumbnailBar) {
217220
thumbnailBarMode = ThumbnailBarMode.THUMBNAIL_BAR_MODE_SCROLLABLE;
218221
} else if (showThumbnailBar.equals(SHOW_THUMBNAIL_BAR_NONE)) {
219222
thumbnailBarMode = ThumbnailBarMode.THUMBNAIL_BAR_MODE_NONE;
223+
} else if (showThumbnailBar.equals(SHOW_THUMBNAIL_BAR_FLOATING)) {
224+
thumbnailBarMode = ThumbnailBarMode.THUMBNAIL_BAR_MODE_FLOATING;
225+
} else if (showThumbnailBar.equals(SHOW_THUMBNAIL_BAR_PINNED)) {
226+
thumbnailBarMode = ThumbnailBarMode.THUMBNAIL_BAR_MODE_PINNED;
220227
}
221228
configuration.setThumbnailBarMode(thumbnailBarMode);
222229
}

android/src/main/java/com/pspdfkit/views/PdfView.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,11 @@ void manuallyLayoutChildren() {
365365
}
366366

367367
private void applyThumbnailBarPadding() {
368-
View fragmentView = findViewById(R.id.pspdf__fragment_layout);
368+
if (fragment == null) {
369+
return;
370+
}
371+
372+
View fragmentView = fragment.getView();
369373
if (fragmentView != null && configuration.getThumbnailBarMode() != ThumbnailBarMode.THUMBNAIL_BAR_MODE_NONE) {
370374
fragmentView.setPadding(0, 0, 0, pdfThumbnailBar.getHeight());
371375
}

samples/Catalog/Catalog.android.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ class PdfViewInstantJsonScreen extends Component<{}> {
567567
<PSPDFKitView
568568
ref="pdfView"
569569
document="file:///android_asset/Annual Report.pdf"
570-
configuration={{}}
570+
configuration={{ showThumbnailBar: "pinned" }}
571571
fragmentTag="PDF1"
572572
onStateChanged={event => {
573573
this.setState({

0 commit comments

Comments
 (0)