PdfViewer
PdfViewer copied to clipboard
move the PdfViewer activity to be hosted as a Fragment
Google seems to prefer and consider single-Activity architecture with Fragments as a best practice for managing UI, as seen by their Sunflower app and https://android-developers.googleblog.com/2018/05/use-android-jetpack-to-accelerate-your.html (though now they're looking into Compose and whatever new frameworks they want to move one to lol)
Using a Fragment for the WebView might be helpful for future features such as
- supporting multiple tabs of PDFs (though this could be beyond the scope of a simple PDF reader)
- supporting some initial blank screen to tell users to pick a document and, after document selection, swapping it out with the Fragment that holds the WebView