Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Mobile Development > BOOK: Professional Android 2 Application Development
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Android 2 Application Development
This is the forum to discuss the Wrox book Professional Android 2 Application Development, 2nd Edition by Reto Meier; ISBN: 978-0-470-56552-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android 2 Application Development section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 14th, 2011, 10:57 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default RelativeLayout vs. LinearLayout in Chapter 5 To-Do List-Example

Hi everyone,

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.

Greetings,

Ted
Reply With Quote
  #2 (permalink)  
Old August 1st, 2013, 05:00 PM
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Android Linear Layout scroll

Hi

Android linear layout, as the name suggests, all the elements(like textview , button ,…) are displayed in a linear fashion, either Horizontally or Vertically and this behavior is set in android: orientation which is an attribute of the node Linear Layout. -

check this link where the linear layout is explained in detail <a href="http://www.pavanh.com/2012/09/android-linear-layout-with-example.html">Android Linear Layout</a>
Reply With Quote
  #3 (permalink)  
Old August 1st, 2013, 05:01 PM
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Android Linear Layout scroll

Hi

Android linear layout, as the name suggests, all the elements(like textview , button ,…) are displayed in a linear fashion, either Horizontally or Vertically and this behavior is set in android: orientation which is an attribute of the node Linear Layout. -

check this link where the linear layout is explained in detail Android Linear Layout
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
To Do list chapter one WaJMHome BOOK: Professional Android 2 Application Development 8 November 14th, 2011 10:12 AM
Chapter 4 - To Do List solo BOOK: Professional Android 2 Application Development 1 June 15th, 2011 09:55 PM
Chapter 2 To Do List errors louie2107 BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 5 March 23rd, 2011 09:56 AM
Chapter 6 To Do List EricTapia BOOK: Professional Android 2 Application Development 0 April 14th, 2010 02:40 AM
Chapter 3 To do list question ttdevelop BOOK: Professional Android 2 Application Development 4 March 30th, 2010 12:18 AM



All times are GMT -4. The time now is 11:34 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.