-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add feature to open an external PDF with kDrive using kDrive PDF viewer #1179
Conversation
237a9f4
to
2e9bd4d
Compare
4554342
to
fcbab03
Compare
e4c9f64
to
c3d1d1f
Compare
The nav bar is of the wrong color, and is it normal that the UI doesn't hide when you click on the center of the screen like inside the app? Also I can't seem to be able entirely slide down the bottom sheet. Maybe check if there's a way to filter-out our own app from the "open in" action. Google seems to be doing so with their drive app. Also, did you check the issue reported by SonarCloud? |
d154eaa
to
26f7463
Compare
app/src/main/java/com/infomaniak/drive/views/ExternalFileInfoActionsView.kt
Outdated
Show resolved
Hide resolved
31416c3
to
7ca2a63
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does "send a copy" still makes sens as a wording when sharing the file?
Also I got this error when opening any preview from within the app:
FATAL EXCEPTION: main
Process: com.infomaniak.drive, PID: 20933
kotlin.UninitializedPropertyAccessException: lateinit property bottomSheetBehavior has not been initialized
at com.infomaniak.drive.ui.fileList.preview.PreviewSliderFragment.setupWindowInsetsListener$lambda$21$lambda$20(PreviewSliderFragment.kt:255)
at com.infomaniak.drive.ui.fileList.preview.PreviewSliderFragment.$r8$lambda$ZdZOV44Tay1G4Ct21o1EmSpiRDM(Unknown Source:0)
at com.infomaniak.drive.ui.fileList.preview.PreviewSliderFragment$$ExternalSyntheticLambda6.onApplyWindowInsets(Unknown Source:4)
at androidx.core.view.ViewCompat$Api21Impl$1.onApplyWindowInsets(ViewCompat.java:5233)
at android.view.View.dispatchApplyWindowInsets(View.java:11309)
at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:7320)
at androidx.core.view.ViewCompat$Api20Impl.dispatchApplyWindowInsets(ViewCompat.java:5975)
at androidx.core.view.ViewCompat.dispatchApplyWindowInsets(ViewCompat.java:2960)
at androidx.fragment.app.FragmentContainerView.dispatchApplyWindowInsets(FragmentContainerView.kt:218)
at androidx.core.view.ViewCompat$Api20Impl.dispatchApplyWindowInsets(ViewCompat.java:5975)
at androidx.core.view.ViewCompat.dispatchApplyWindowInsets(ViewCompat.java:2960)
at androidx.fragment.app.FragmentContainerView.dispatchApplyWindowInsets(FragmentContainerView.kt:218)
at android.view.ViewGroup.newDispatchApplyWindowInsets(ViewGroup.java:7345)
at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:7327)
at android.view.ViewGroup.newDispatchApplyWindowInsets(ViewGroup.java:7345)
at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:7327)
at android.view.ViewGroup.newDispatchApplyWindowInsets(ViewGroup.java:7345)
at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:7327)
at android.view.ViewGroup.newDispatchApplyWindowInsets(ViewGroup.java:7345)
at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:7327)
at android.view.ViewGroup.newDispatchApplyWindowInsets(ViewGroup.java:7345)
at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:7327)
at android.view.ViewGroup.newDispatchApplyWindowInsets(ViewGroup.java:7345)
at android.view.ViewGroup.dispatchApplyWindowInsets(ViewGroup.java:7327)
at android.view.ViewRootImpl.dispatchApplyInsets(ViewRootImpl.java:2291)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2525)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1952)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8171)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
at android.view.Choreographer.doCallbacks(Choreographer.java:796)
at android.view.Choreographer.doFrame(Choreographer.java:731)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Does "send a copy" still makes sens as a wording when sharing the file?
-
Also the comportement when hidding the UI is still not the same as when I open the pdf inside the app. Why do the statusbar/navbar not hide when clicking in the center of the preview? Couldn't we have put in common between the two activities to keep the same behavior?
-
Also, I don't know if this branch introduced the issue, but when viewing a PDF inside the app, when hidding the UI, the pdf scrollbar appears and when showing the UI, the scrollbar hides


@LunarX I changed the "Send a copy" wording after discussing with Joris. Maybe you can talk to him about that. I have fixed the behavior to match what we have in kDrive PDF reader. I tried to put everything I can in common between the default PDF reader and what we have in the app based on the current architecture of the app. Let me know what do you think. default-pdf-reader-kDrive.webm |
ca110cb
to
d13102f
Compare
061c935
to
68b54ff
Compare
|
depends on #1270
Add PreviewPDFActivity to give the possibility to the user to open a PDF on his phone with kDrive
kdrive_default_reader_pdf.webm