Chapter 7 - tryout info, possible errata
I'm learning content providers in chapter 7 and I have a doubt about the setContentView(R.layout.main) at the beginning of page 296.. Do we need it? If yes, I have some doubts.. main layout has a listview with two text views under it... Then we assign to the list view a SimpleCursorAdapter which maps the two columns over the two views, which are repeated in sequence in the list view, as I can see from figure 7-2, one for each contact... My question is how does it understand that it does not have to show two text views under the listview, since we loaded them with setContentView(R.layout.main) at the beginning? Are they removed programmatically and automatically from the layout by the SimpleCursorAdapter?
|