ДЗ по Activity 01#224
Open
mahonin-ms wants to merge 3 commits intoAndroid-Developer-Basic:homework/activity_01from
Open
ДЗ по Activity 01#224mahonin-ms wants to merge 3 commits intoAndroid-Developer-Basic:homework/activity_01from
mahonin-ms wants to merge 3 commits intoAndroid-Developer-Basic:homework/activity_01from
Conversation
motorro
reviewed
Nov 15, 2025
|
|
||
| buttonOpenView = findViewById<ViewGroup>(R.id.base).findViewById(R.id.button) | ||
| buttonOpenView.text = resources.getStringArray(R.array.open_buttons)[1] // Open Activity B | ||
| buttonOpenView.setOnClickListener { |
There was a problem hiding this comment.
@mahonin-ms, тут надо еще подумать.
Задание:
По клику на кнопку “Open ActivityB” запустите ActivityB в отдельном стеке
А у вас и режим запуска стандартный и affinity нету - откроется в том же стеке
|
|
||
| btn1 = findViewById<ViewGroup>(R.id.base_1).findViewById(R.id.button) | ||
| btn1.text = resources.getStringArray(R.array.open_buttons)[0] // Open Activity A | ||
| btn1.setOnClickListener { startActivity(Intent(this, ActivityA::class.java)) } |
There was a problem hiding this comment.
@mahonin-ms, нужно еще подумать:
По клику на кнопку “Open ActivityA” запустите ActivityA, таким образом, чтобы мы попали на существующий экземпляр ActivityA и у него был вызван метод onNewIntent,
У вас режим запуска A - стандартный. Переопределите в ней onNewIntent для наглядности
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.
No description provided.