Create a new activity called ProfileActivity.kt, and here is the code:
class ProfileActivity : AppCompatActivity() {
private var username: String = ""
private var password: String = ""
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_profile)
setTitleName()
username = PrefUtils.getUsername(this)!!
password = PrefUtils.getPassword(this)!!
}
}