Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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 Search this Thread Display Modes
  #1 (permalink)  
Old January 9th, 2009, 04:07 PM
Registered User
 
Join Date: Jan 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 4 Compass background color

Is this a typo or is there something I'm not understanding about why we don't use r.getColor here? It works fine without but produces a different background color and I'm guessing we're just getting lucky since the reference and the color value we expect are both integers.

Quote:
circlePaint.setColor(r.getColor(R.color.background _color));
//circlePaint.setColor(R.color.background_color);
Later when using setColor for the text and marker Paint objects we do use r.getColor.

Thanks.
Reply With Quote
  #2 (permalink)  
Old January 10th, 2009, 01:07 PM
Reto's Avatar
Wrox Author
Points: 287, Level: 5
Points: 287, Level: 5 Points: 287, Level: 5 Points: 287, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2008
Location: London, United Kingdom
Posts: 61
Thanks: 1
Thanked 7 Times in 6 Posts
Default

Quote:
Originally Posted by eags View Post
I'm guessing we're just getting lucky since the reference and the color value we expect are both integers.
You're exactly right. There's a typo there that should read (as you suggest):
Code:
circlePaint.setColor(r.getColor(R.color.background_color));
Thanks for pointing it out, hope it didn't slow you down much
__________________
Reto Meier

Author, "Professional Android 4 Application Development", Wrox, ©2012, 2010, 2008
@retomeier
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
change color of background meena88 C# 2005 3 December 1st, 2009 04:48 AM
Background Color matrix ArnieStewart BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 3 October 21st, 2008 01:12 AM
mdi-background color avats General .NET 1 February 28th, 2008 10:25 AM
background-color disappears harpua CSS Cascading Style Sheets 1 August 19th, 2005 04:53 PM
Get stylesheet's background color muklee Javascript How-To 2 October 31st, 2004 08:03 AM



All times are GMT -4. The time now is 05:36 PM.


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