Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Mobile Development > BOOK: Professional Android 4 Application Development
|
BOOK: Professional Android 4 Application Development
This is the forum to discuss the Wrox book Professional Android 4 Application Development Reto Meier; ISBN: 978-1-1181-0227-5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android 4 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
 
Old August 6th, 2012, 06:09 AM
Registered User
 
Join Date: Aug 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 4 - Notepad line not drawn beneath date in ToDo List

After following through chapter 4 and reorganizing the app to show the date of an entry to the right of it, the notepad_line is still just drawn under the TextView with the task, but not under the text. How would I go about to change that? I checked the sample code, but it has the same issue.
 
Old August 27th, 2012, 04:52 AM
Registered User
 
Join Date: Aug 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by mschroeder View Post
After following through chapter 4 and reorganizing the app to show the date of an entry to the right of it, the notepad_line is still just drawn under the TextView with the task, but not under the text. How would I go about to change that? I checked the sample code, but it has the same issue.
The same for me.

I think the date field is placed after drawing the line.
Unfortunately I don't know how to solve yet.

I hope someone will guide us.

Last edited by ivanoman; August 27th, 2012 at 07:00 AM..
 
Old October 29th, 2012, 08:40 PM
Registered User
 
Join Date: Jun 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need to sublass the TextView

The issue is because the date is represented by a TextView which is not subclassed and thus does not have its onDraw method overriden to draw the line.

In todolist_item.xml rather than using a TextView to represent the date, use something like com.example.todolist.ToDoDateItemView which could be coded exactly like com.example.todolist.ToDoListItemView except delete all lines of code referring to the margin.

/Phil
 
Old October 30th, 2012, 05:04 AM
Registered User
 
Join Date: Aug 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Obvious in hindsight. Thank you!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 3 - Todo list, Enter ToDo Item disappearing cman123 BOOK: Beginning Building Mobile Application Development in the Cloud 6 April 7th, 2013 11:37 PM
Chapter 7 Todo List tinted BOOK: Professional Android 2 Application Development 2 August 26th, 2010 06:04 PM
Chapter 2 - Todo List error jerrod1225 BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 1 July 15th, 2010 07:17 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





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