From d350c5ced51172cb7286dc16f968aa123b7e07bc Mon Sep 17 00:00:00 2001 From: David Friedman Date: Thu, 12 Feb 2015 21:30:59 -0800 Subject: This file is misplaced, and serves no purpose. I am sending it to oblivion. Change-Id: I91ed7bc228849f3181591357037b368b4b261eee --- docs/html/training/basics/fragments/support-lib.jd | 83 ---------------------- 1 file changed, 83 deletions(-) delete mode 100644 docs/html/training/basics/fragments/support-lib.jd (limited to 'docs/html/training/basics/fragments') diff --git a/docs/html/training/basics/fragments/support-lib.jd b/docs/html/training/basics/fragments/support-lib.jd deleted file mode 100644 index a1d781b..0000000 --- a/docs/html/training/basics/fragments/support-lib.jd +++ /dev/null @@ -1,83 +0,0 @@ -page.title=Using the Support Library -page.tags=support library -helpoutsWidget=true - -trainingnavtop=true - -@jd:body - -
-
-

This lesson teaches you to

-
    -
  1. Set Up Your Project with the Support Library
  2. -
  3. Import the Support Library APIs
  4. -
-

You should also read

- -
-
- -

The Android Support Library provides a JAR -file with an API library that allows you to use some of the more recent Android APIs in your app -while running on earlier versions of Android. For instance, the Support Library provides a version -of the {@link android.app.Fragment} APIs that you can use on Android 1.6 (API level 4) and -higher.

- -

This lesson shows how to set up your app to use the Support Library in order to use fragments -to build a dynamic app UI.

- - -

Set Up Your Project with the Support Library

- -
- -

Figure 1. The Android SDK Manager with the -Android Support package selected.

-
- -

To set up your project:

- -
    -
  1. Download the Android Support package using the SDK Manager.
  2. - -
  3. Create a libs directory at the top level of your Android project.
  4. -
  5. Locate the JAR file for the library you want to use and copy it into the libs/ -directory. -

    For example, the library that supports API level 4 and up is located at -<sdk>/extras/android/support/v4/android-support-v4.jar.

  6. -
  7. Update your manifest file to set the minimum API level to 4 and the target -API level to the latest release: -
    <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="15" />
    -
  8. -
- - -

Import the Support Library APIs

- -

The Support Library includes a variety of APIs that were either added in recent versions of -Android or don't exist in the platform at all and merely provide additional support to you when -developing specific application features.

- -

You can find all the API reference documentation for the Support Library in the -platform docs at {@link android.support.v4.app android.support.v4.*}.

- -

Warning: To be sure that you don't accidentally use new -APIs on an older system version, be certain that you import the {@link -android.support.v4.app.Fragment} class and related APIs from the {@link android.support.v4.app} -package:

-
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentManager;
-...
-
-
- - -

When creating an activity that hosts fragments while using the Support Library, you must also -extend the {@link android.support.v4.app.FragmentActivity} class instead of the traditional {@link -android.app.Activity} class. You'll see sample code for the fragment and activity in the next -lesson.

- -- cgit v1.1