Top Banner
EESTEC Android Workshops 102 - MVC, ListView and Adapters
9

EESTEC Android Workshops - 102 MVC, ListView and Adapters

Jul 17, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: EESTEC Android Workshops - 102 MVC, ListView and Adapters

EESTEC Android Workshops

102 - MVC, ListView and Adapters

Page 2: 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

Page 3: EESTEC Android Workshops - 102 MVC, ListView and Adapters

eestec_android.akalipetis.comOur code for today

Page 4: EESTEC Android Workshops - 102 MVC, ListView and Adapters

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

Page 5: EESTEC Android Workshops - 102 MVC, ListView and Adapters

The Photoset Model

Title - The title of the photoset

Description - The description of the photoset

ID - The unique identifier of this photoset

Page 6: EESTEC Android Workshops - 102 MVC, ListView and Adapters

ListView

Page 7: EESTEC Android Workshops - 102 MVC, ListView and Adapters

Adapters

Match data with views

Used by list views to populate their rows

Page 8: EESTEC Android Workshops - 102 MVC, ListView and Adapters

Making everything workWith some test data...