Домашняя работа по активити 1 задача#45
Open
Galinnka wants to merge 7 commits intoOtus-Android:masterfrom
Open
Домашняя работа по активити 1 задача#45Galinnka wants to merge 7 commits intoOtus-Android:masterfrom
Galinnka wants to merge 7 commits intoOtus-Android:masterfrom
Conversation
Activity Homework Otus-Android#1-1
motorro
reviewed
Nov 30, 2023
| <activity | ||
| android:name=".ActivityA" | ||
| android:exported="true" | ||
| android:launchMode="standard" |
There was a problem hiding this comment.
@Galinnka , тут у вас неверный режим активити. Не выполняется задание 2.3, а создается новый экземпляр
| finish() | ||
| } | ||
| buttonS.setOnClickListener { | ||
| finishAffinity() |
There was a problem hiding this comment.
@Galinnka , тут все верно. Стек закрывается и попадаем обратно на А. Если вам кажется, что он не закрылся потому, что торчит в последних запущенных программах - то это норм. потому что это список ПОСЛЕДНИХ ЗАПУЩЕННЫХ, а не тех, что сейчас в памяти
| <activity | ||
| android:name=".ActivityD" | ||
| android:label="ActivityD" | ||
| android:launchMode="singleTask" |
There was a problem hiding this comment.
@Galinnka , зачем вам тут сингл-таск? Вы все верно флажками разрулили в создании интентов!
| <activity | ||
| android:name=".ActivityC" | ||
| android:label="ActivityC" | ||
| android:launchMode="singleTop" |
There was a problem hiding this comment.
@Galinnka , поясните, пожалуйста, зачем вам сингл-топ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Здравствуйте! Из всех задач у меня почему-то не получилось во 2й задаче 6я подзадача, там вроде как должно использоваться finishAffinity(), но он у меня стек не закрывает уже по всякому делала и я не смогла до конца решить что не так не пойму.