On Wed, Jun 22, 2011 at 5:54 AM, nadam <[email protected]> wrote: >> if you want to take advantage of defining the ListView once >> and using it across multiple activities (e.g., one with the content >> fragment for tablets/TVs and one without the content fragment for >> phones), using a ListFragment is a good idea. > The examples usually only have one Activity for the list view, for > instance the one called "Activity A" in > http://developer.android.com/guide/topics/fundamentals/fragments.html > or the unnamed activity i assume would be called TitlesActivity in > http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html.
Here is a sample application using a ListFragment for both phones and tablets: https://github.com/commonsguy/cw-advandroid/tree/master/Honeycomb/FeedFragments > The separation between tablets/TVs and phones are made using layout > xml files and I guess this could be done with include instead if we > have the ListView in a separate file and include it in one layout file > for xlarge and another layout for normal. The benefit of ListFragment > seems to be limited to the same benefits you have with a ListActivity. You are welcome to your opinion. I am welcome to mine. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2 -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

