SetText. Note that the activity serves as its own listener for checkbox state changes since it implements the interface (via )

 

Note that the activity serves as its own listener for checkbox state changes since it implements the interface (via ). The callback for the listener is , which receives the checkbox whose state has changed and what the new state is. In this case, we update the text of the checkbox to reflect what the actual box contains.

The result? Clicking the checkbox immediately updates its text, as you can see in Figures 6‑4 and 6‑5.

Figure 6‑4. The CheckBoxDemo sample application, with the checkbox unchecked

Figure 6‑5. The same application, now with the checkbox checked

 








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


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

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

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

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