Galleries, Give or Take the Art

 

The widget is not one ordinarily found in GUI toolkits. It is, in effect, a horizontally‑laid‑out listbox. One choice follows the next across the horizontal plane, with the currently‑selected item highlighted. On an Android device, one rotates through the options through the left and right D‑pad buttons.

Compared to the , the takes up less screen space while still showing multiple choices at one time (assuming they are short enough). Compared to the , the always shows more than one choice at a time.

The quintessential example use for the is image preview – given a collection of photos or icons, the lets people preview the pictures in the process of choosing one.

Code‑wise, the works much like a or . In your XML layout, you have a few properties at your disposal:

• controls the number of pixels between entries in the list.

• controls what is used to indicate a selection – this can either be a reference to a (see the resources chapter) or an RGB value in or similar notation.

• indicates if the selection bar (or ) should be drawn before (false) or after (true) drawing the selected child – if you choose , be sure that your selector has sufficient transparency to show the child through the selector, otherwise users will not be able to read the selection.

 

 








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


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

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

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

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