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 trialAndre Du Plessis
4,874 PointsAction Bar not avaliable on ListActivity in Android Studio
I have seen many people getting stuck on this with no real apparent solutions. It would be better to run the self destructing message application in Eclipse like Ben is doing it. I got up to this point as in the Edit friends activity it wasn't really important - but here where you need the Send button to appear it is critical.
For other people who have reached this point however the same as I have. Ben has helped a guy called Ken to resolve the issues with his app on the Forum here : https://teamtreehouse.com/forum/android-selfdestructing-app-question
What I found from his code posted here : https://github.com/kenwalger/Ribbit
Was that a the Activity was not extended from ListView but from Activity and then a GridView was added (I assume a ListView would work as well - not sure why GridView was used, but it may be become more apparent later on...)
I hope the course get adapted to be used in Android Studio sooner than later.
Andre Du Plessis
4,874 PointsThe solution is to have the class extend Activity and not ListActivity. However you need to then create the ListView in the onCreate. Similar to Ken's code except he used a GridView, but the code will be very similar. Also look at how the option menus are managed as it is little bit different. I decided to finish module complete by rather just following the videos and then refer to Ken's project - you get a pretty good idea what is going on and you can still check your knowledge with the questions and the challenges... not ideal, but it will do at such a late stage and I need to move on to the last 2 modules.
Andrew Zhang
4,364 PointsAndrew Zhang
4,364 PointsWould like to see a solution to this as well. What would be the equivalent in Androidstudio?