Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning Android 4 Application Development
This is the forum to discuss the Wrox book Beginning Android 4 Application Development by Wei-Meng Lee; ISBN: 978-1-1181-9954-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning 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 December 13th, 2013, 09:32 AM
Authorized User
Points: 65, Level: 1
Points: 65, Level: 1 Points: 65, Level: 1 Points: 65, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2012
Posts: 15
Thanks: 2
Thanked 1 Time in 1 Post
Default Fragments P70

Struggled to get this tutorial working on my emulator until I tested it on a real phone which worked fine.

After a bit of research I discovered that Fragments were only introduced in API 11 and my emulator was using API 10 so be aware if you experience issues!
 
Old February 5th, 2014, 01:24 PM
Registered User
Points: 15, Level: 1
Points: 15, Level: 1 Points: 15, Level: 1 Points: 15, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2014
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by wolfenr View Post
Struggled to get this tutorial working on my emulator until I tested it on a real phone which worked fine.

After a bit of research I discovered that Fragments were only introduced in API 11 and my emulator was using API 10 so be aware if you experience issues!
I created an emulator using API 17, and the app still crashed. I can't figure out how to get it working in the emulator.


1.) If you want to be able to run this app on an emulator targetting API 10 or older or to run this app on an older smartphone running Android 2.3.x or older than you need to import android.support.v4.app.Fragment.

2.) If you are creating your own Fragment1.java and Fragment2.java make certain that the filenames are exactly with the first letter in uppercase and all other letters in lowercase. This is because of the lines in main.xml android:name="net.learn2develop.Fragments.Fragment 1 and android:name="net.learn2develop.Fragments.Fragment 2

3.) The app crashed unless the main activity extended FragmentActivity not just Activity.

Last edited by centralnj; February 5th, 2014 at 04:57 PM.. Reason: additions




Similar Threads
Thread Thread Starter Forum Replies Last Post
Fragments REMMING BOOK: Beginning Android 4 Application Development 1 April 26th, 2012 10:20 AM
Fragments project help mri3iguns BOOK: Beginning Android Tablet Application Development 1 January 22nd, 2012 07:57 PM
Tried Running Fragments Project jxp2p BOOK: Beginning Android Tablet Application Development 2 January 9th, 2012 10:01 PM
Replace text fragments janise MySQL 5 November 1st, 2004 04:43 PM
How can XSL transform XHTML data into fragments? lamwh XSLT 0 April 19th, 2004 10:15 AM





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