Skip to content

[HOMEWORK_ACTIVITIES_1]#38

Open
MVSYCHEV wants to merge 2 commits intoOtus-Android:homeworks/activities_01from
MVSYCHEV:homeworks/activities_01
Open

[HOMEWORK_ACTIVITIES_1]#38
MVSYCHEV wants to merge 2 commits intoOtus-Android:homeworks/activities_01from
MVSYCHEV:homeworks/activities_01

Conversation

@MVSYCHEV
Copy link

@MVSYCHEV MVSYCHEV commented Nov 4, 2023

No description provided.

buttonOpenD.setOnClickListener {
println("You clicked on button ${R.string.open_activity_d}")
val intent = Intent(this, ActivityD::class.java).apply {
flags = Intent.FLAG_ACTIVITY_CLEAR_TASK
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут не хватает флажка. Посмотрите документацию

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

val intent = Intent(this, ActivityA::class.java).apply {
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
}
startActivity(intent)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Да, а тут добавить finishAffinity, как я писал в отзыве

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments