Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialkai qin
7,735 PointsQuestions about using ListView Adapter in Fragment
The EditFriends Activity is built with fragment by default in eclipse. I use the setListAdapter method in findBackground(). But when I clicked on the Menu- Edit Friends. The app crashes.
3 Answers
Masum Bergmann
Courses Plus Student 4,129 PointsMy eclipse also keeps creating Fragments for each new Activity created (slightly annoying). My solution is to copy the the xml from the layout_fragment and use it to replace the layout_activity. Then delete the layout_fragment, and delete the code in the Activity class that still refers to the fragment... and you're all set... you now have a new and clean activity (without the fragment).
Hope this helps!
kai qin
7,735 PointsThank you Masum. I just tried it. It works.
Masum Bergmann
Courses Plus Student 4,129 PointsGreat!! I'm glad I was able to help!!
Masum Bergmann
Courses Plus Student 4,129 PointsMasum Bergmann
Courses Plus Student 4,129 PointsA more detailed explanation: http://stackoverflow.com/questions/22289164/adt-blank-activity-created-with-fragment-activity