title: supportFragmentManager not working in fragment
body: <p>I am trying to use <strong>bottom sheet fragment  in another fragment</strong></p>
  <p>So <strong>supportFragmentManager</strong> is showing error in code below (because it doesn't work with fragment)</p>
  <pre><code>override fun onMapLongClick(point: LatLng)  {
      try {
          CustomBottomSheetDialogFragment().apply {
              show(supportFragmentManager, CustomBottomSheetDialogFragment.TAG)
          }
      } catch (e: Exception) {
          e.printStackTrace()
      }
  }
  </code></pre>
  <p>I tried</p>
  <pre><code>* childSupportManager
  * requireActivity().supportFragmentManager
  * activity.supportFragmentManager
  * parentFragmentManager
  * (activity as AppCompatActivity).supportFragmentManager
  </code></pre>
  <p>nothing worked</p>
  <p>CustomBottomSheetDialogFragment</p>
  <pre><code>    package com.example.weatherapp.ui.dashboard
  
  import android.os.Bundle
  import android.view.LayoutInflater
  import android.view.View
  import android.view.ViewGroup
  import android.widget.Toast
  import com.example.weatherapp.R
  import com.google.android.material.bottomsheet.BottomSheetDialogFragment
  import kotlinx.android.synthetic.main.layout_modal_bottom_sheet.*
  
  class CustomBottomSheetDialogFragment : BottomSheetDialogFragment() {
  
      companion object {
  
          const val TAG = &quot;CustomBottomSheetDialogFragment&quot;
  
      }
  
      override fun onCreateView(
          inflater: LayoutInflater,
          container: ViewGroup?,
          savedInstanceState: Bundle?
      ): View? {
          return inflater.inflate(R.layout.layout_modal_bottom_sheet, container, false)
      }
  
      override fun onActivityCreated(savedInstanceState: Bundle?) {
          super.onActivityCreated(savedInstanceState)
  
          firstButton.setOnClickListener {
              //handle click event
              Toast.makeText(context, &quot;First Button Clicked&quot;, Toast.LENGTH_SHORT).show()
          }
          secondButton.setOnClickListener {
              //handle click event
              Toast.makeText(context, &quot;Second Button Clicked&quot;, Toast.LENGTH_SHORT).show()
          }
          thirdButton.setOnClickListener {
              //handle click event
              Toast.makeText(context, &quot;Third Button Clicked&quot;, Toast.LENGTH_SHORT).show()
          }
  
          }
       }
  </code></pre>
  <p>It shows the error</p>
  <pre><code>    W/System.err: java.lang.IllegalStateException: Fragment CustomBottomSheetDialogFragment{37cafe5} 
                    (1887523f-4ffe-4232-bacc-d4114dcfe8a4)} has not been attached yet.
                    at androidx.fragment.app.Fragment.getChildFragmentManager(Fragment.java:980)
                    at com.example.weatherapp.ui.dashboard.DashboardFragment.onMapLongClick(DashboardFragment.kt:163)
                    at com.google.android.gms.maps.zzz.onMapLongClick(Unknown Source:2)
                    at com.google.android.gms.maps.internal.zzao.dispatchTransaction(Unknown Source:5)
  </code></pre>