Peter vdL
Peter vdL

Reputation: 4993

list with a fragment?

What is the paradigm to have ListView next to some other fragment in Android?

Now we have the wide screen tablets, I want to update my code to add a Fragment next to the ListView.

How do you do that, in outline?

Upvotes: 2

Views: 2105

Answers (2)

sami boussacsou
sami boussacsou

Reputation: 1081

you can use the android documentation as an approch : http://developer.android.com/guide/topics/fundamentals/fragments.html

Upvotes: 0

CommonsWare
CommonsWare

Reputation: 1006584

Step #1: Probably use a ListFragment for the list, though I think that this is not strictly required.

Step #2: Have a space in your layout for the fragment you want to add.

Step #3: Use FragmentManager and a FragmentTransaction to add the fragment.

Upvotes: 2

Related Questions