Wrox Programmer Forums
|
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 April 16th, 2013, 04:20 PM
Registered User
 
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..
 
Old April 21st, 2013, 02:09 AM
Authorized User
 
Join Date: Apr 2013
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..
 
Old April 23rd, 2013, 05:13 PM
Registered User
 
Join Date: Apr 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for responding, A23G.





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





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