Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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 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 Display Modes
  #1 (permalink)  
Old December 13th, 2013, 08: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!
Reply With Quote
  #2 (permalink)  
Old February 5th, 2014, 12: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 03:57 PM. Reason: additions
Reply With Quote
Reply


Thread Tools
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
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 06:57 PM
Tried Running Fragments Project jxp2p BOOK: Beginning Android Tablet Application Development 2 January 9th, 2012 09:01 PM
Replace text fragments janise MySQL 5 November 1st, 2004 03:43 PM
How can XSL transform XHTML data into fragments? lamwh XSLT 0 April 19th, 2004 10:15 AM



All times are GMT -4. The time now is 11:51 PM.


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