Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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 April 16th, 2013, 04:20 PM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ToDoList pg129 newItemFragment

MainActivity.java .... 4.2.2

import java.util.ArrayList;
import android.widget.EditText;
import android.widget.ListView;
import .... whatever

public class newItemFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
return inflater.inflate(R.layout.new_item_fragment, container, false);
}
}
----------------- page 129
Error code says: The public type newItemFragment must be defined in its own file. What does this involve?

Last edited by Davem; April 16th, 2013 at 04:23 PM..
Reply With Quote
  #2 (permalink)  
Old April 21st, 2013, 02:09 AM
Authorized User
Points: 51, Level: 1
Points: 51, Level: 1 Points: 51, Level: 1 Points: 51, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2013
Location: Netherlands
Posts: 14
Thanks: 0
Thanked 1 Time in 1 Post
Default

Well the error description is pretty clear, you need to define NewItemFragment in a new file if it is not, just like the main activity.
I downloaded the code from this website and ran it, so I can attest that there is no error in this specific chapter. I suggest looking at the code itself and also the instruction they gave e.g. if it should replace a block of code or if it should be in a new file...

Last edited by Android23Geek; April 21st, 2013 at 02:13 AM..
Reply With Quote
  #3 (permalink)  
Old April 23rd, 2013, 05:13 PM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for responding, A23G.
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 8 ToDoList Database michael_mctear BOOK: Professional Android 4 Application Development 11 December 18th, 2013 08:34 AM
Chapter 4 ToDoList Problem cythe BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 6 June 15th, 2011 09:53 PM
ToDoList Keyboard problem dbald1995 BOOK: Professional Android 2 Application Development 3 March 9th, 2011 09:29 AM
Chapter 2 - ToDoList Example srkrkalyan BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 3 January 22nd, 2011 01:09 PM
chapter 2 todolist kdpohl1 BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 5 July 16th, 2010 03:59 AM



All times are GMT -4. The time now is 04:05 AM.


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