SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Technology Stocks : Apple Tankwatch
AAPL 272.56-0.5%10:45 AM EST

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: pyslent who wrote (13370)12/7/2011 8:34:49 PM
From: sylvester80  Read Replies (2) of 32692
 
Yes, it is a 3.0+ API but fragments are supported from Android 1.6. For more information see: Compatibility Library.

You have to use the compatibility libraries provided by Google. Here's how you use Fragments on devices < 3.0

Open Eclipse
Window->Android SDK and AVD
Available Packages->Android Compatibility package (install this)

Once installed, right click the Android project you want to add Fragment support for.

Build Path->Configure Build Path
Libraries tab
Add External JARs
Add the android-support-v4.jar (should be in the android downloads folder under extras/android/compatibility/v4

Now you application supports Fragments. There are some key differences to using the compatibility package over using SDK 3.0+. For instance, the activity classes that use fragments must extend FragmentActivity not Activity. Enjoy!
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext