From d043297ef4e95c5313f5ea41f937d4835c23920b Mon Sep 17 00:00:00 2001 From: Andrew Solovay Date: Mon, 15 Jun 2015 14:01:44 -0700 Subject: docs: Clarified when you can put the fragments in the root view. Per bug b/10641907, putting fragments in the root view *only* works if the device runs Android 3.0 or later. Chris and Adam say we don't really want to suggest that work flow even for these devices, so I'm taking that info out. bug: 10641907 Change-Id: Ie44acbb534b8e0cea8dbbfaaf2c65836b1c31be6 --- docs/html/guide/topics/ui/actionbar.jd | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/html/guide/topics/ui/actionbar.jd b/docs/html/guide/topics/ui/actionbar.jd index d972c47..b2f98ad 100644 --- a/docs/html/guide/topics/ui/actionbar.jd +++ b/docs/html/guide/topics/ui/actionbar.jd @@ -907,11 +907,7 @@ to ensure the best fit in the action bar.

To get started, your layout must include a {@link android.view.ViewGroup} in which you place each {@link android.app.Fragment} associated with a tab. Be sure the {@link android.view.ViewGroup} has a resource ID so you can reference it from your code and swap the tabs within it. -Alternatively, if the tab content will fill the activity layout, then your activity doesn't need a -layout at all (you don't even need to call {@link android.app.Activity#setContentView -setContentView()}). Instead, you can place each fragment in the default root view, which you can -refer to with the {@code android.R.id.content} ID.

- +

Once you determine where the fragments appear in the layout, the basic procedure to add tabs is:

-- cgit v1.1