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
| 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 Search this Thread Display Modes
  #1 (permalink)  
Old June 29th, 2010, 03:45 AM
Registered User
 
Join Date: Oct 2009
Posts: 7
Thanks: 0
Thanked 1 Time in 1 Post
Default Chapter 4 : Todo List Item, can't see text

I have followed the book as far as I can tell and have gone back and rechecked things (I'm up to page 96).

The application works in that I can type in a list item and add it to the list. A new list item appears each time I add one, but I can't see the text for any of them. I thought it was a typo for the text color, but I have even copied the text color line from todolist_item.xml:

Code:
android:textColor="@color/notepad_text"
Into main.xml to change the edit text color:
Code:
<EditText
	  android:id="@+id/myEditText"
	  android:layout_width="fill_parent"
	  android:layout_height="wrap_content"
	  android:textColor="@color/notepad_text"
	  android:text="New To Do Item"
	/>
This text properly changes color for the edit box, but I can't get anything to appear in the list. The paper color and margin lines are drawing fine just can't see any text.

Last edited by IAmCorbin; June 29th, 2010 at 12:52 PM..
Reply With Quote
  #2 (permalink)  
Old June 29th, 2010, 02:56 PM
Registered User
 
Join Date: Oct 2009
Posts: 7
Thanks: 0
Thanked 1 Time in 1 Post
Default

downloaded the book code and found my problem.

Code:
this.margin = myResources.getColor(R.color.notepad_margin);
should be:
Code:
this.margin = myResources.getDimension(R.dimen.notepad_margin);
oops.
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
Chapter 7 ToDo List Code WDPetry BOOK: Professional Android 2 Application Development 3 February 28th, 2011 01:40 AM
Problems w/ Force Close on Todo List Chapter 2 ogre150 BOOK: Professional Android 2 Application Development 2 June 9th, 2010 04:02 PM
ToDo List Problems - Chapter 4 wolverineik BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 0 February 28th, 2010 09:29 AM
Chapter 6 Todo List removeItem abowman BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 4 February 5th, 2010 11:18 AM
Chapter 4 Customising Your Todo List MMC2 BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 0 May 12th, 2009 08:34 AM



All times are GMT -4. The time now is 09:10 AM.


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