Reputation: 12424
I got 2 menus which are almost the same except for the title in a single item. I noticed that Eclipse allow me to compile these menus even though the parallel items in both menus got the same ID.
Is it safe to use menus like that meaning have something like this code on 2 different places:
case R.id.menuitem1: ...
case R.id.menuitem2: ...
Upvotes: 0
Views: 244
Reputation: 653
Yes, it is safe. Though it is always a better practice to not have same ids as a practice.
Upvotes: 1