Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Mobile Development > BOOK: Beginning Android Application Development
|
BOOK: Beginning Android Application Development
This is the forum to discuss the Wrox book Beginning Android Application Development by Wei-Meng Lee; ISBN: 978-1-1180-1711-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Android 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 January 11th, 2012, 07:40 PM
Registered User
 
Join Date: Jan 2012
Posts: 4
Thanks: 0
Thanked 2 Times in 2 Posts
Default BOOK ERROR CH2 Returning Results from an Intent

Just did the Try It Out for this section and while there were no errors, the app wasn't running correctly. It immediately showed the username field and OK button, hitting center D-pad button didn't do anything, and entering name and hitting the OK button did nothing.

After looking through the code it seemed to me that the code it instructs to be entered in main.xml in step 1

Code:
<TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Please Enter Your Name" />
    <EditText 
        android:id="@+id/txt_username"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" />
    <Button
        android:id="@+id/btn_OK"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="OK" />
should actually be entered into activity2.xml, so I tried it and the app worked as described in the book.

I checked the downloadable code, and it seems to have that code entered into main.xml as well. I haven't tried running the downloadable code to confirm that it doesn't work either, but following the flow of the code and the desired result, it really seems like that code belongs in activity2.xml, not main.xml.

Hope this is helpful.
----------------------------------------------------
---Edit---
Discovered the Errata section for the book... this error and others are already listed HERE. A good place to check if stuck on a project as it seems there are a few problems in the code in the book.

Last edited by Gink; January 12th, 2012 at 05:07 PM..
The Following User Says Thank You to Gink For This Useful Post:
Cliff2310 (January 18th, 2012)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Confused between the rules applied to Intent and Intent Filters fungi8210 BOOK: Professional Android 2 Application Development 1 March 10th, 2010 06:48 AM
SQL returning odd results jakeone SQL Language 1 November 13th, 2006 05:07 AM
$sql not returning results, this cant be this hard cspgsl Beginning PHP 0 May 5th, 2006 11:50 AM
Stored Procedures returning no results to access 50bmg_de SQL Server 2000 5 February 21st, 2006 04:58 AM
Query returning 0 results although SQL is valid aquagal77 Classic ASP Databases 4 March 31st, 2005 11:06 AM





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