Wrox Programmer Forums
|
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
 
Old March 21st, 2010, 01:13 AM
Authorized User
 
Join Date: Mar 2010
Posts: 16
Thanks: 0
Thanked 1 Time in 1 Post
Default Ch 4 Todo List 2 - odd behavior

After clicking the menu button, the remove menu item does not always appears even when there are todo items in the list. I know of two scenarios that cause this problem.

First scenario, multiple dpad clicks makes the app not display the remove item menu. I know changing the following code

Code:
        if (event.getAction() == KeyEvent.ACTION_DOWN)
          if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {
to this

Code:
        if (event.getAction() == KeyEvent.ACTION_DOWN && addingNew)
          if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {
helps eliminate this scenario.

I am trying to figure out the second scenario that can be reproduce with the following events:

add 2 todo items,
remove one,
try removing the last item - you will see no remove menu item.
 
Old March 21st, 2010, 03:22 AM
Authorized User
 
Join Date: Mar 2010
Posts: 16
Thanks: 0
Thanked 1 Time in 1 Post
Default

By default, after adding an item it is selected. After removing the item, there is no selection of another item. I found out you can use the arrow to select an item. For some reason, a click does not select an item which probably means I would have to code a handler.





Similar Threads
Thread Thread Starter Forum Replies Last Post
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
ToDo List setting the focus MMC2 BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 5 June 2nd, 2009 10:17 PM
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
Odd behavior on linked forms ! penta Access 2 April 1st, 2005 09:48 AM





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