RelativeLayout vs. LinearLayout in Chapter 5 To-Do List-Example
since this is my first post here, so greetings to you (^-^)/
Please be kind since I'm still more or less an Android beginner.
While re-reading parts of the book, I stumbled over some strangeness I didn't realize the first time:
In Chapter 5, when the To-Do List example is customized with an Array Adapter (unfortunately there's no Listing number I can refer to... but it's the code two pages after Listing 5-24), the layout XML resource for the To-Do List items (todolist_item.xml) uses a RelativeLayout for grouping the two item's TextViews, but in the following ToDoItemAdapter's getView() method, a LinearLayout is used (either newly created and inflated, or cast from the the RelativeLayout argument).
It works both ways, and actually just the layout (i.e. how it looks) changes depending on whether a RelativeLayout or a LinearLayout is used - so I was wondering whether this code was somehow on purpose, or whether it was by mistake.