NewTabSpec

SetContent new TabContentFactory

Public createTabContent

Return new AnalogClock this

 

 

SetIndicator

AddTab

 

 

In our button’s callback, we create a object and give it an anonymous . The factory, in turn, returns the to be used for the tab – in this case, just an . The logic for constructing the tab’s View could be much more elaborate, such as using to construct a view from layout XML.

In Figure 10‑7 you can see that initially, when the activity is launched, we just have the one tab whereas Figure 10‑8 shows multiple tabs.

Figure 10‑7. The DynamicTab application, with the single initial tab

Figure 10‑8. The DynamicTab application, with three dynamically‑created tabs

 








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


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

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

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

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