Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android Build a Self-Destructing Message Android App Relating Users in Parse.com Executing a Query

Sam Coles
PLUS
Sam Coles
Courses Plus Student 13,887 Points

Ribbit Project - ActionBar/Toolbar query

The action bar is missing in my add/delete friends display screen. My EditFriendsActivity is extending ListActivity. I know that with Lollipop ActionBar is now Toolbar but I am trying to implement this into my project and have noticed on the forum that I am not the only one who has come across the problem. I have tried the solutions that people have suggested but this hasn't worked.

If you have over come this problem I would really appreciate it if you could take a look at my project files and let me know the code that needs to be added/changed to fix this. Github - https://github.com/scoles2428/PictureThis

I originally completed the Ribbit App a while back but decided to refresh my memory by going through the project again with the latest version of Android Studio and SDK (v22).....something I have come to regret due to the videos being outdated which makes it particularly hard to follow. I have seen that a few people have already suggested this but I do believe that this project should be updated for Android Studio ASAP.

1 Answer

Nicolas Hampton
Nicolas Hampton
44,625 Points

Sam,

I looked this over off and on for a day, as I was having the same problem, and figured it out. The problem is, to make a long story short, is that the array adapter is attached to the entire EditFriendsActivity extending ListActivity, when really what we want is to make the list a fragment inside EditFriendsActivity that shows up underneath the action bar. This can be done by restructuring the EditFriendsActivity in the same way we structured the MainActivity, as an ActionBarActivity that uses ListActivity Fragments for it's main view, but some of us have been working on eliminating the deprecated code and working with Android Studio, so my source code, although it works completely and has no deprecated code, looks WAY different than what you have, and would take some work to modify. Let me know if you want it, I'll throw you the github, but basically, recreate the MainActivity structure.

Nicolas

Kevin Hackett
Kevin Hackett
10,441 Points

Hi Nicolas, I am working away with the tutorial on Android Studio and making good progress. Can I assume that the version you are talking about here is the one posted on your GitHub account? Looks like a really good job.

Kevin