Using a Kotlin code i want to know how to add a button outside the action bar which takes me to the previous Activity on click
You can call finish() when button is clicked
button.setOnClickListener { finish() }