title: How to open same Activity with different data in Android Kotlin?
body: <pre><code>class FirstActivity : AppCompatActivity() {
      companion object{
          val USER_KEY="FirstActivity"
      }
  
  
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.activity_first)
  
          button_firstActivity.setOnClickListener {
              val string:String=textView_first.text.toString()
  
              val intent=Intent(this,MainActivity::class.java)
  
              intent.putExtra(USER_KEY,string)
              startActivity(intent)
          }
      }
  }
  
  
  class MainActivity : AppCompatActivity() {
      companion object{
          val MAINUSERKEY="MainActivity"
          var str:String=""
      }
  
  
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.activity_main)
  
          str=intent.getStringExtra(FirstActivity.USER_KEY)
  
          textview_main.text=str
  
          button_Run.setOnClickListener {
              val edittextstring=editText1.text.toString()
              val intent=Intent(this,MainActivity::class.java)
              intent.putExtra(MAINUSERKEY,edittextstring)
              startActivity(intent)
          }
      }
  }
  </code></pre>
  
  <p>Hello every one! I am new to Android programming with Kotlin. </p>
  
  <p>I have two activities, suppose A and B. I want to start activity B from A and when B starts, it will display the <code>TextView</code> string of A into <code>TextView_Main</code>. </p>
  
  <p>It is working fine now. I want to start activity B again on clicking <code>button_Run</code> which is on Activity B and passing a string again which I entered in <code>edittext</code> of Activity B. And now it should be displayed on <code>textview</code> of Activity B, when it opens again.</p>
  
  <p>Please help me do this.</p>