title: Navigation Component - findNavController from ViewPager fragment not work
body: <p>I have a BottomNavigation with 3 menu option(Home,Service and More).
  Home tab fragment contains TabLayout and ViewPager.</p>
  
  <p>ViewPager has 2 fragment - CurrentDetailFargment and PreviousDetailFragment.</p>
  
  <p>ViewPager Works, After that when I applied click on Button of CurrentDetailFargment  using findNavController() then I get exception.</p>
  
  <p><a href="https://developer.android.com/guide/navigation/navigation-swipe-view" rel="noreferrer">Reference</a></p>
  
  <p><strong>Navigate Payment Screen</strong></p>
  
  <pre><code>findNavController().
  navigate(R.id.action_currentBillFragment_to_paymentOptionsFragment)
  </code></pre>
  
  <p><strong>Exception</strong></p>
  
  <pre><code>java.lang.IllegalArgumentException: navigation destination XXXXXXX:id/action_currentBillFragment_to_paymentOptionsFragment is unknown to this NavController
      at androidx.navigation.NavController.navigate(NavController.java:789)
      at androidx.navigation.NavController.navigate(NavController.java:730)
      at androidx.navigation.NavController.navigate(NavController.java:716)
      at androidx.navigation.NavController.navigate(NavController.java:704)
      at com.bses_yamuna.user.home.currentbill.view.CurrentBillFragment.navigateToPayNow
  </code></pre>
  
  <p><strong>According to exception</strong> - I had not mention 'action_currentBillFragment_to_paymentOptionsFragment' id in my graph. But I had declare it graph. This graph is use with BottomNaviagtion.</p>
  
  <p>Please Let me know that I resolve this issues.</p>
  
  <p><strong>Activity Layout Section-</strong></p>
  
  <pre><code>    &lt;fragment
          android:id="@+id/navigationHost"
          android:name="androidx.navigation.fragment.NavHostFragment"
          android:layout_width="match_parent"
          android:layout_height="0dp"
          app:defaultNavHost="true"
          app:layout_constraintBottom_toTopOf="@+id/bottomNavigation"
          app:layout_constraintTop_toBottomOf="@+id/constraint_top"
          app:navGraph="@navigation/menu_navigation" /&gt;
  
      &lt;com.google.android.material.bottomnavigation.BottomNavigationView
          android:id="@+id/bottomNavigation"
          style="@style/Widget.BottomNavigationView"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="?android:attr/windowBackground"
          app:itemIconTint="@drawable/bottom_navigation_item_colors"
          app:itemTextColor="@drawable/bottom_navigation_item_colors"
          app:labelVisibilityMode="labeled"
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintLeft_toLeftOf="parent"
          app:layout_constraintRight_toRightOf="parent"
          app:menu="@menu/bottom_nav_menu_modify" /&gt;
  </code></pre>
  
  <p><strong>Adapter</strong></p>
  
  <pre><code> class ViewPagerAdapter (fragmentManager:FragmentManager, private val titleList: ArrayList&lt;String&gt;): FragmentStatePagerAdapter(fragmentManager,BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT ) {
  
  override fun getItem(position: Int): Fragment {
      return if(position==0)
          CurrentBillFragment()
      else
          PreviousBillFragment()
  
  }
  
  override fun getCount(): Int {
     return titleList.size
  }
  
  override fun getPageTitle(position: Int): CharSequence? {
      return titleList[position]
  }
  override fun getItemPosition(value: Any): Int {
      return PagerAdapter.POSITION_NONE
  }
  </code></pre>
  
  <p>}</p>
  
  <p><strong>Set Adapter on ViewPager-</strong></p>
  
  <pre><code>private fun setupViewPager() {
      val titles = ArrayList&lt;String&gt;()
      titles.add(getString(R.string.current_bill_detail))
      titles.add(getString(R.string.previous_bill_detail))
      val adapter = ViewPagerAdapter(childFragmentManager, titles)
      mBinding.tabLayout.setupWithViewPager( mBinding.pager)
      mBinding.pager.adapter = adapter
  
  }
  </code></pre>
  
  <p><strong>menu_navigation.xml-</strong></p>
  
  <pre><code>   &lt;fragment
      android:id="@+id/currentBillFragment"
      android:name="XXXXX.view.CurrentDetailFargment "
      tools:layout="@layout/fragment_current_bill"&gt;
  
      &lt;action          
    android:id=
    "@+id/action_currentBillFragment_to_currentBillSummaryFragment"
          app:destination="@+id/currentBillSummaryFragment" /&gt;
  
  &lt;/fragment&gt;
  &lt;fragment
      android:id="@+id/paymentOptionsFragment"
      android:name="XXXXX.view.PaymentOptionsFragment"
      tools:layout="@layout/fragment_payment_option"/&gt;
  </code></pre>