Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Mobile Development > BOOK: Professional Android 2 Application Development
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old September 14th, 2011, 09: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
  #2 (permalink)  
Old August 1st, 2013, 04: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>
  #3 (permalink)  
Old August 1st, 2013, 04: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


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 08:55 PM
Chapter 2 To Do List errors louie2107 BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 5 March 23rd, 2011 08:56 AM
Chapter 6 To Do List EricTapia BOOK: Professional Android 2 Application Development 0 April 14th, 2010 01:40 AM
Chapter 3 To do list question ttdevelop BOOK: Professional Android 2 Application Development 4 March 29th, 2010 11:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.