title: TextView Id keeps calling on null no matter what way I try to change its content
body: <p>I have a <code>TabLayout</code> with 3 fragments inside. Fragment 0 contains details, 1 is a description and 2 is location.</p>
  
  <p>But no matter how I try to call the fragment Ids inside my <code>carDetailsActivity</code> or I try to pass the value from the activity to the fragments it keeps calling on null and giving the following result:
  Tab Fragment</p>
  
  <p><a href="https://i.stack.imgur.com/rXHGk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rXHGk.png" alt="enter image description here"></a></p>
  
  <p>Now I tried multiple ways one of them to <code>Bundle</code> the text value from the activity to the fragment but I still got null "IllegaleStateException". (which was the best option to my knowledge) but it still didnt work. </p>
  
  <p>This is how I want it to look (the design is in arabic):</p>
  
  <p><a href="https://i.stack.imgur.com/zCNFu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zCNFu.png" alt="enter image description here"></a></p>
  
  <p>Here is my Activity where im calling them at the moment but I just get empty strings (had to give them ? because the app kept crashing if I didnt):</p>
  
  <pre><code>class CarDetailsActivity : BaseActivity() {
      val TAG = "CarDetailsActivity"
  
      override fun onCreate(savedInstanceState: Bundle?) {
          val car = intent.extras!!.getParcelable&lt;Car&gt;(DETAILS_TRANSFER) as Car
          super.onCreate(savedInstanceState)
          setContentView(R.layout.activity_car_details)
          activateToolbar(true)
  
          carPriceDetails?.text = car.price.toString()
          carDate?.text = car.date
          carCategory?.text = car.category
          carModel?.text = car.brandModel
          carYear?.text = car.modelYear
          carKilometer?.text = car.kilometer.toString()
          carGear?.text = car.gearType
          carFuel?.text = car.fuelType
  
          val fragmentAdapter = FragmentCarInfo(supportFragmentManager)
          viewPager.adapter = fragmentAdapter
  
          tabLayout.setupWithViewPager(viewPager)
  
  
          carBrand.text = car.brand
          carModel.text = car.brandModel
          carYear.text = car.modelYear
  
  
          Picasso.with(this).load(car.image)
              .error(R.drawable.ic_cars)
              .placeholder(R.drawable.ic_cars)
              .into(carImage)
  
      }
  }
  </code></pre>
  
  <p>Here is the main <code>Fragment</code> that contains that layout that contains the details:</p>
  
  <pre><code>class InfoFragment : Fragment() {
  
      override fun onCreateView(
          inflater: LayoutInflater, container: ViewGroup?,
          savedInstanceState: Bundle?
      ): View {
          // Inflate the layout for this fragment
          return inflater.inflate(R.layout.fragment_car_details_info, container, false)
      }
  }
  </code></pre>
  
  <p>I have asked this similar question before but it was'nt clear enough so I hope this was a better way to post my problem. </p>
  
  <p><strong>-EDIT</strong>
  My tabLayout viewPager uses this</p>
  
  <pre><code>class FragmentCarInfo (fm : FragmentManager) : FragmentPagerAdapter(fm){
  
      override fun getItem(position: Int): Fragment {
          return when (position) {
              0-&gt; {
                  InfoFragment()
              }
              1 -&gt; {
                  AboutFragment()
              }
              else -&gt; {
                  return LocationFragment()
              }
  
          }
      }
  
      override fun getCount(): Int {
          return 3
      }
  
      override fun getPageTitle(position: Int): CharSequence? {
          return when (position) {
              0-&gt; "Details"
              1-&gt; "About"
              else -&gt; {
                  return "Locations"
              }
          }
      }
  }
  </code></pre>