Android Jetpack Navigation with WebView Demo
You can install this demo from Google Play
This link is a deeplink and will take you to the settings page when viewed in the demo.
Deep link test: https://webnavdemo/settings
The objective was to make each new page opening in the webview correspond with a new Destination in the NavGraph so that the WebView coordinates with navigation stack. This is done by adding a custom Navigator to the NavController in a trivial subclass of NavHostFragment. This Navigator provides the placeholder URLDestination that corresponds to each opening of a webpage in the WebView fragment