Fleeting Images

 

Android has two widgets to help you embed images in your activities: and . As the names suggest, they are image‑based analogues to and , respectively.

Each widget takes an attribute (in an XML layout) to specify what picture to use. These usually reference a drawable resource, described in greater detail in the chapter on resources. You can also set the image content based on a from a content provider via .

, a subclass of , mixes in the Button behaviors, for responding to clicks and whatnot.

For example, take a peek at the layout from the sample project which is found along with all other code samples at http://apress.com:

 

 

The result, just using the code‑generated activity, is shown in Figure 6‑2.

Figure 6‑2. The ImageViewDemo sample application

 








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


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

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

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

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