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 trial

Android Build a Self-Destructing Message Android App Sending Messages Adding a Send Button

I have no idea what to do or what is wrong

I have spent the last several hours trying to figure out how to make the icon show up. Ive gone through all the old questions which complain about how depreciated the video is and the solutions they have seem depreciated I think. Ive reworked all the code from the RecipientsActivity over a dozen times and I feel like Ive broken my code and tinkered with other files too much and I just have no idea what to do since I don't understand at all why none of the things I have tried dont work.

Ok so I think I got it back to where it was, It will still not load the icon in the action bar but it does load the action bar without giving an error. Everything I do from here gives an error and crashes the app. I dont know what to do next though.

-Edit and by Back to where it was I mean very Similar to what the code is in the video. I remember I had to do a lot of tinkering to get the action bar to appear but I dont remember what I did in the other files but the files in question (RecipientsActivity, activity_recipients.xml) seem identical to the video now

1 Answer

finally figured it out. In the recipients.xml file the line android:showAsAction="always" gave off a red swiggle line so I switched it to app:showAsAction="always" as it was recommended. This switched the app from showing the icon when i hit the settings button (hardware button) to being in the top right corner as it should be.