Skip to content

Commit

Permalink
Migrating to PSPDFKIT 2024.4.0 while resolving a few issues:
Browse files Browse the repository at this point in the history
Transitioning from using PdfFragment to PdfUiFragment due to it’s having Back-n-Forward buttons for jumping to another page after navigating via inter-pdf link.
Known issue:
PSPDFKIT’s Title of the PDF document briefly appearing at the top of the screen when navigating to screen.

Fixes:
Back button after jumping to another page. Closes #147.
Don't use rectangular selection for highlighting Closes #130.
Adding Page Counter & In-Pdf quick navigation bottom bar to Pdf Screen.Closes #121.

Upping versionCode to 88.
  • Loading branch information
Dima-Android committed Aug 9, 2024
1 parent 1f0202b commit 27b6d93
Show file tree
Hide file tree
Showing 5 changed files with 159 additions and 123 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package org.zotero.android.pdf.reader
import android.content.res.Resources
import android.net.Uri
import android.util.TypedValue
import android.view.Gravity
import android.view.ViewGroup
import android.widget.FrameLayout
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.foundation.layout.fillMaxSize
Expand All @@ -13,7 +11,6 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.viewinterop.AndroidView
import androidx.fragment.app.FragmentContainerView
import com.pspdfkit.ui.PdfThumbnailBar
import org.zotero.android.R
import org.zotero.android.architecture.ui.CustomLayoutSize
import timber.log.Timber
Expand All @@ -39,21 +36,11 @@ fun PdfReaderPspdfKitView(
}
frameLayout.addView(fragmentContainerView)

val pdfThumbnailBar = PdfThumbnailBar(context)
val thumbnailBarLayoutParams = FrameLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT
)
thumbnailBarLayoutParams.gravity = Gravity.BOTTOM
pdfThumbnailBar.layoutParams = thumbnailBarLayoutParams
frameLayout.addView(pdfThumbnailBar)

vMInterface.init(
isTablet = layoutType.isTablet(),
uri = uri,
containerId = fragmentContainerView.id,
fragmentManager = fragmentManager,
pdfThumbnailBar = pdfThumbnailBar,
annotationMaxSideSize = annotationMaxSideSize
)
frameLayout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ interface PdfReaderVMInterface {
containerId: Int,
fragmentManager: FragmentManager,
isTablet: Boolean,
pdfThumbnailBar: PdfThumbnailBar,
)

fun onTagsClicked(annotation: Annotation)
Expand Down
Loading

0 comments on commit 27b6d93

Please sign in to comment.