Android_800_thumb800

List Controls with Adapter code examples

Clickable ListView

clickable_listview

activity_main.xml

simple_list_row.xml

ListView Item layout

MainActivity.java

Adding other controls with ListView

Get list item selected, add check icon in item

listitem_with_check

activity_main.xml

simple_list_item_checked.xml

MainActivity.java

GridView Control

Most widget toolkits offer one or more grid-based controls. Android has a GridView control that can display data in the form of a grid. Note that although we use the term data here, the contents of the grid can be text, images, and so on.

android_control_gridview

activity_main.xml

MainActivity.java

Spinner Control

The Spinner control is like a drop-down menu. It is typically used to select from a relatively short list of choices. If the choice list is too long for the display, a scrollbar is automatically added for you.

listcontrol_spinner

activity_main.xml

MainActivity.java

Gallery Control

comming soon…

Android 6 – List Controls

Category: AndroidPrograming
0
879 views

Join the discussion

Your email address will not be published. Required fields are marked *