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 trialPedro Guimaraes
2,671 PointsWhenever I click "Edit Friends" in the action bar menu the Dialog for choosing media shows up
I can't figure out what is going on, whenever I click on the action bar "Edit Friends" button the dialog for choosing media shows up for a second and then the app goes to the actual Edit Friends fragment.
Here are my project files: https://dl.dropboxusercontent.com/u/24445885/Ribbit.zip
Video of the bug: https://www.youtube.com/watch?v=Fk2dXSNu0J4
4 Answers
Steve Hunter
57,712 PointsThat would be in the onOptionsItemSelected
method inside MainActivity
.
switch(itemId) {
...
case R.id.action_edit_friends:
// do stuff
break;
case R.id.action_camera:
....
break;
}
Steve Hunter
57,712 PointsI can't get into your zip file for some reason ... anyway, have you got a break
after your switch case
options? If not, it may execute them all.
http://docs.oracle.com/javase/tutorial/java/nutsandbolts/switch.html
Pedro Guimaraes
2,671 PointsThanks, that was the problem :)
Daniel Whitaker
10,996 PointsI had the same issue, thanks.
Pedro Guimaraes
2,671 PointsPedro Guimaraes
2,671 PointsIf I comment out these lines:
It doesn't happen but that is not exactly a solution