LoadUrl

 

 

They simply load a different URL into the browser: the CommonsWare home page in one (Figure 24‑3), the Android home page in the other (Figure 24‑4). The resulting UI shows what tabbed browsing could look like on Android.

Figure 24‑3. The IntentTabDemo sample application, showing the first tab

Figure 24‑4. The IntentTabDemo sample application, showing the second tab

Using distinct subclasses for each targeted page is rather wasteful. Instead we could have packaged the URL to open as an “extra” in an and used that to spawn a general‑purpose activity, which would read the URL out of the “extra,” and use that. The proof of this is left as an exercise for the reader.

 

 








Дата добавления: 2015-05-16; просмотров: 623;


Поиск по сайту:

При помощи поиска вы сможете найти нужную вам информацию.

Поделитесь с друзьями:

Если вам перенёс пользу информационный материал, или помог в учебе – поделитесь этим сайтом с друзьями и знакомыми.
helpiks.org - Хелпикс.Орг - 2014-2024 год. Материал сайта представляется для ознакомительного и учебного использования. | Поддержка
Генерация страницы за: 0.007 сек.