Activities

To finish activity and close the activity, use finish() or finishAffinity().

btnBack.setOnClickListener { finish() }

Finish() is for closing current activity.

FinishAffinity() is for closing activity stacks.