title: send parameter from activity to Fragment kotlin
body: <p>i´m traying to send parameter to fragment. I´m using Volley Class to get data from my db with mysql. I´m transform my response in jsonObject and create my arguments:</p>
  <pre><code>val stringRequest: StringRequest = object : StringRequest(
              Method.POST, EndPoint.URL,
              Response.Listener { response -&gt;
                  try {
                      val jsonObject = JSONObject(response)
  
                      if (jsonObject != null) {
                          val dataJson: JSONObject = jsonObject.getJSONObject(&quot;user&quot;)
                          val name = dataJson.getString(&quot;name&quot;)
                          val address = dataJson.getString(&quot;address&quot;)
                          val email = dataJson.getString(&quot;email&quot;)
                          val phone = dataJson.getString(&quot;phone&quot;)
                          val password = dataJson.getString(&quot;password&quot;)
  
                          val intent = Intent(this, ProfileActivity::class.java)
                          // set parameter to activity
                          val bundle = Bundle()
                          bundle.putString(&quot;name&quot;, name)
                          bundle.putString(&quot;address&quot;, address)
                          bundle.putString(&quot;email&quot;, email)
                          bundle.putString(&quot;phone&quot;, phone)
                          bundle.putString(&quot;password&quot;, password)
                          intent.putExtras(bundle)
                          Toast.makeText(applicationContext, &quot;Logged ok&quot;, Toast.LENGTH_SHORT).show()
                          startActivity(intent)
  
  
                      }
                  }
  </code></pre>
  <p>In my Profile activity i´m receiving my parameters:</p>
  <pre><code>name = intent.getStringExtra(&quot;name&quot;).toString()
  address = intent.getStringExtra(&quot;address&quot;).toString()
  userEmail = intent.getStringExtra(&quot;email&quot;).toString()
  phone = intent.getStringExtra(&quot;phone&quot;).toString()
  password = intent.getStringExtra(&quot;password&quot;).toString()
  
  I/ContentValues: name: david
  I/ContentValues: userEmail: prueba@prueba.com
  I/ContentValues: phone: null
  I/ContentValues: pass: 123456
  </code></pre>
  <p>But i´m setting my values in EditText but i can´t show it when execute my app. In my fragment i´m doing:</p>
  <pre><code>override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View? {
          // Inflate the layout for this fragment
          val view =  inflater.inflate(R.layout.fragment_profile, container, false)
          val bundle = this.arguments
  
          val editUserName = view.findViewById&lt;EditText&gt;(R.id.userName)
          var userAddresEdit = view.findViewById&lt;EditText&gt;(R.id.userAddress)
          var userEmailEdit = view.findViewById&lt;EditText&gt;(R.id.userEmailText)
          var userPhoneEdit = view.findViewById&lt;EditText&gt;(R.id.userPhone)
          var userPasswordEdit = view.findViewById&lt;EditText&gt;(R.id.userPasswordEdit)
  
          /*  userAddresEdit.setText(userAddressConst.toString())
            userEmailEdit.setText(userEmailConst.toString())
            userPhoneEdit.setText(userPhoneConst.toString())
            userPasswordEdit.setText(passwordConst.toString())*/
  
          Log.i(TAG, bundle.toString())
  
          return view
      }
  </code></pre>
  <p>My log show <code>null</code> bundle variable.. Idon´t know i cant pass my data to fragment i´m reading in internet, but i can´t find info for to do this.</p>
  <p>I´m using kotlin in all my proyect.</p>
  <p>Thanks for readme and sorry for my bad english</p>
  <p><strong>Update</strong></p>
  <p><em>profileActivity</em></p>
  <pre><code>ProfileFragment.newInstance(name, address, userEmail, phone, password)
  </code></pre>
  <p><em>Fargment</em></p>
  <pre><code>companion object {
  
          @JvmStatic
          fun newInstance(param1:String, param2:String, param3:String, param4:String, param5:String) =
              ProfileFragment().apply {
                  arguments = Bundle().apply {
                      name = param1
                  }
              }
      }
  </code></pre>
  <p><em>result</em></p>
  <pre><code>I/ContentValues: name: david
  I/ContentValues: userEmail: prueba@prueba.com
  I/ContentValues: phone: null
  I/ContentValues: pass: 123456
  I/ContentValues: null
  </code></pre>