adapters
Download
Skip this Video
Download Presentation
Adapters

Loading in 2 Seconds...

play fullscreen
1 / 6

Adapters - PowerPoint PPT Presentation


  • 126 Views
  • Uploaded on

Adapters. Adapters (again!). Adapters are bridging classes, that bind data to user-interface Views. The adapter is responsible for creating the child views used to represent each item and providing access to the underlying data.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Adapters' - mabyn


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
adapters again
Adapters (again!)
  • Adapters are bridging classes,that bind data to user-interface Views. The adapter is responsible for creating the child views used to represent each item and providing access to the underlying data.
  • User-interface controls that support Adapter binding must extend the AdapterView abstract class.
  • It’s possible to create your own AdapterView-derived controls and create new Adapter classes to bind them.

CS440

android supplied adapters
Android supplied Adapters
  • Android supplies a set of Adapters that pump data into the native user-interface widgets.
  • Because Adapters are responsible both for supplying the data and selecting the Views that represent each item, Adapters can radically modify the appearance and functionality of the controls they’re bound to.

CS440

android supplied adapters1
Android supplied Adapters
  • ArrayAdapter: The ArrayAdapter is a generic class that binds Adapter Views to an array of objects.
  • By default, the ArrayAdapter binds the toString value of each object to a TextView control defined within a layout.
  • Alternative constructors allow you to use more complex layouts, or you can extend the class to use alternatives to Text View (such as populating an ImageViewor nested layout) by overriding the getView method.

CS440

android supplied adapters2
Android supplied Adapters
  • SimpleCursorAdapter:The SimpleCursorAdapter binds Views to cursors returned from Content Provider queries. You specify an XML layout definition and then bind the value within each column in the result set, to a View in that layout.

CS440

references
References
  • Professional Android 2 Application Development (Wrox Programmer to Programmer) by RetoMeier
  • http://developer.android.com

CS440

ad