Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

Study Adapter Pattern and UI design #5

Open
2 tasks
timmy00274672 opened this issue Dec 9, 2013 · 2 comments
Open
2 tasks

Study Adapter Pattern and UI design #5

timmy00274672 opened this issue Dec 9, 2013 · 2 comments

Comments

@timmy00274672
Copy link
Owner

Study Adapter Pattern

In TimelineActivity#onResume(), we use

  adapter = new TimelineApdater(this,cursor);  //
  listTimeline.setAdapter(adapter);  //

And TimelineAdapter#bindView(View row,Conext context, Cursor cursor) is where the actual binding of a cursor to view happens.

The question is:

Cursor is the set of result containing many tuples. And in bindView() method, row view should be view of just one tuple. How one tuple binds to one row? Does it create many rows? How are the rows binded to the listTimeline?

  • Create a wiki page

Find materials for android UI design

  • common components(packages and classes)
  • best practice
  • Create a wiki page
@ghost ghost assigned csyo Dec 9, 2013
@timmy00274672
Copy link
Owner Author

@csyo ❓ is updated

@timmy00274672
Copy link
Owner Author

Core idea for adapter is bind presentation layer to the underlying data sources.

Adapter pattern is a design pattern that translates one interface for a class into a compatible interface. 

For example, we use an adapter to translate RS232 to USB.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants