Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get context menu id on onContextItemSelected()?

 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

I am designing an android application.In which I want the id for switch comparisons.

How to do this



But what to write for case:
comparsion?

I mean how can i fetch Id of those item that I defined on R.String.Menu Resources?

Thanks
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you saying that this is a menu for which there is no corresponding XML file in res/menu? That's where you would define names for all menu entries (as part of the android:id attribute).
 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got it thanks
I just changed my approach
Now I defined a resource file in res folder for menu item



Problem sorted out!!

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic