EESTEC Summer School 2012 - Entity Framework - Erni Durdevic
EESTEC Android Workshops - 102 MVC, ListView and Adapters
-
Upload
antonis-kalipetis -
Category
Documents
-
view
664 -
download
1
Transcript of EESTEC Android Workshops - 102 MVC, ListView and Adapters
EESTEC Android Workshops
102 - MVC, ListView and Adapters
What we’ll cover today
MVC - Model View Controller
Creating a model
Lists, lists, lists
Creating an adapter
Making everything work
eestec_android.akalipetis.comOur code for today
MVCModel
Describes the data used by our application
View
Whatever the user sees, our XML files
Controller
Handles what is shown and user interactions, can be an Activity
The Photoset Model
Title - The title of the photoset
Description - The description of the photoset
ID - The unique identifier of this photoset
ListView
Adapters
Match data with views
Used by list views to populate their rows
Making everything workWith some test data...
Tasks for next time
Make the row view nicer
Add the description
Show a Toast on item click
Resources for next time:
ListView
BaseAdapter
OnItemClickListener