Константин
Константин

Start Аndroid: Урок 30. Подробнее про onActivityResult. Зачем нужны requestCode и resultCode

  • 7335
Загружено: Константин . Категория: Программирование . 27 июля 2013.
На этом видео:
Описание
Android программирование (видеоуроки). В этом уроке: разбираемся, зачем нужны requestCode и resultCode в onActivityResult. На

прошлом уроке мы поверхностно рассмотрели, как вызвать Activity, и как сделать так, чтобы она вернула результат. Рассмотрим

немного подробней этот механизм. Создадим приложение, которое будет вызывать два разных Activity и получать от них результат.

Как мы помним, результат приходит в метод onActivityResult. И requestCode используется, чтобы отличать друг от друга

пришедшие результаты. А resultCode -- позволяет определить успешно прошел вызов или нет.

Для англоязычных пользователей есть английские титры.

Текстовая версия урока: http://startandroid.ru/ru/uroki/vse-uroki-spiskom/69-urok-30-podrobnee-pro-onactivityresult-zachem-

nuzhny-requestcode-i-resultcode.html

Обсуждение урока на форуме: http://forum.startandroid.ru/viewtopic.php?t=136

Android Programming (video tutorial). In this lesson: understand exactly why we need requestCode and resultCode in

onActivityResult. At the last lesson we looked at superficially, how to call the Activity, and how to make sure that she

returned the result. Let us consider a little more in detail the mechanism. Let's create an application that will cause two

different Activity and obtain their results. As we recall, the result comes in the method onActivityResult. And requestCode

used to distinguish between the results came. A resultCode - to determine the call was successful or not.

For English-speaking users have English subtitles.

Text version of the lesson: http://startandroid.ru/ru/uroki/vse-uroki-spiskom/69-urok-30-podrobnee-pro-onactivityresult-

zachem-nuzhny-requestcode-i-resultcode.html

Talk lesson Online: http://forum.startandroid.ru/viewtopic.php?t=136
Подробнее