title: How to load Fragment in Kotlin?
body: <p>I am new to kotlin I am adding bottom bar in my app</p>
  
  <pre><code>val bottomNavigationView = findViewById&lt;View&gt;(R.id.navigation) as BottomNavigationView
      BottomNavigationViewHelper.removeShiftMode(bottomNavigationView)
      bottomNavigationView.setOnNavigationItemSelectedListener { item -&gt;
          var selectedFragment: Fragment? = null
          when (item.itemId) {
              R.id.action_item1 -&gt; selectedFragment = ItemOneFragment.newInstance()
              R.id.action_item2 -&gt; selectedFragment = ItemTwoFragment.newInstance()
              R.id.action_item3 -&gt; selectedFragment = ItemThreeFragment.newInstance()
              R.id.action_item4 -&gt; selectedFragment = ItemThreeFragment.newInstance()
          }
          val transaction = supportFragmentManager.beginTransaction()
          transaction.replace(R.id.frame_layout, selectedFragment)
          transaction.commit()
          true
      }
  
      //Manually displaying the first fragment - one time only
      val transaction = supportFragmentManager.beginTransaction()
      transaction.replace(R.id.frame_layout, ItemOneFragment.newInstance())
      transaction.commit()
  </code></pre>
  
  <p>ItemOneFragment.java</p>
  
  <pre><code>import android.os.Bundle;
  import android.support.v4.app.Fragment;
  import android.view.LayoutInflater;
  import android.view.View;
   import android.view.ViewGroup;
   public class ItemOneFragment extends Fragment {
   public static ItemOneFragment newInstance() {
      ItemOneFragment fragment = new ItemOneFragment();
      return fragment;
  }
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  }
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      return inflater.inflate(R.layout.fragment_item_one, container, false);
  }}
  </code></pre>
  
  <p>But I am getting the error :
  type mismatch Required : Fragment at ItemOneFragment.newInstance()
  I have tried all stuff 
  Thanks in advance. </p>