-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Домашняя работа по активити 1 задача #45
base: master
Are you sure you want to change the base?
Conversation
Activity Homework Otus-Android#1-1
<activity | ||
android:name=".ActivityA" | ||
android:exported="true" | ||
android:launchMode="standard" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Galinnka , тут у вас неверный режим активити. Не выполняется задание 2.3, а создается новый экземпляр
finish() | ||
} | ||
buttonS.setOnClickListener { | ||
finishAffinity() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Galinnka , тут все верно. Стек закрывается и попадаем обратно на А. Если вам кажется, что он не закрылся потому, что торчит в последних запущенных программах - то это норм. потому что это список ПОСЛЕДНИХ ЗАПУЩЕННЫХ, а не тех, что сейчас в памяти
<activity | ||
android:name=".ActivityD" | ||
android:label="ActivityD" | ||
android:launchMode="singleTask" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Galinnka , зачем вам тут сингл-таск? Вы все верно флажками разрулили в создании интентов!
<activity | ||
android:name=".ActivityC" | ||
android:label="ActivityC" | ||
android:launchMode="singleTop" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Galinnka , поясните, пожалуйста, зачем вам сингл-топ?
Здравствуйте! Из всех задач у меня почему-то не получилось во 2й задаче 6я подзадача, там вроде как должно использоваться finishAffinity(), но он у меня стек не закрывает уже по всякому делала и я не смогла до конца решить что не так не пойму.