Android Navigation Architecture Component - Get current visible fragment : <p>Before trying the Navigation component I used to manually do fragment transactions and used the fragment tag in order to fetch the current fragment.</p>

<p><code>val fragment:MyFragment = supportFragmentManager.findFragmentByTag(tag):MyFragment</code></p>

<p>Now in my main activity layout I have something like:</p>

<pre><code>&lt;fragment
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/nav_host"
        app:navGraph= "@navigation/nav_item"
        android:name="androidx.navigation.fragment.NavHostFragment"
        app:defaultNavHost= "true"
        /&gt;
</code></pre>

<p>How can I retrieve the current displayed fragment by the Navigation component? 
Doing </p>

<p><code>supportFragmentManager.findFragmentById(R.id.nav_host)</code></p>

<p>returns a <code>NavHostFragment</code> and I want to retrieve my shown 'MyFragment`.</p>

<p>Thank you.</p>
