Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Mobile Development > BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2
|
BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2
This is the forum to discuss the Wrox book Professional Android Application Development by Reto Meier; ISBN: 9780470344712
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 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
 
Old February 10th, 2009, 04:18 PM
Registered User
 
Join Date: Feb 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 4 - customizing ToDoList - ruled lines not working correctly

In my attempts to get this example working, I ran into a couple of problems. I think it is trying to draw something like the following for each row but isn't working quite right.

Code:
 
|
|_________________________
1) It appears that the first line should be changed from drawLine(0,0,gMH,0) to drawLine(0,0,0,gMH)

2) The underline part isn't showing for me at all (WinXP) because it is slightly outside of the canvas(?).

My call to getMeasuredHeight() returns 38. If I replace the call to gMH with a fixed value of 37, the line shows.

Is this related to the AntiAlias setting that is used in the Paint() object? I tried a default one, but no change.

gk
 
Old April 3rd, 2009, 09:44 AM
Authorized User
 
Join Date: Mar 2009
Posts: 21
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Well, you don't really need to hardcode anything into the function call. But for a horizontal line, the source code should obviously read:

Code:
canvas.drawLine(0, 0, getMeasuredWidth(), 0, linePaint);
Even the downloaded source code contains the error, so I guess they just didn't test this part properly.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Contains function call not working correctly cnatale XSLT 7 May 8th, 2008 07:53 AM
Hello User, not working correctly? Neotriple BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 1 October 5th, 2006 11:39 AM
Proxxy Connections working, but not correctly??? ramangill VB.NET 0 August 10th, 2005 06:54 AM
Proxxy Connections working, but not correctly??? ramangill Oracle 0 August 10th, 2005 06:53 AM
No error but not working correctly! Adam H-W Javascript 7 November 10th, 2003 09:34 AM





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