This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

onContextItemSelected method for a table row

 
Florin Florentin
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.

I am creating an activity which contains one table. When selecting a row, i want to update or delete the row through context menu options.
The table is within TableLayout view. Each row is added to the TableLayout as a TableRow view, and also for each TableRow i registered it for context menu with registerForContextMenu(tr);

The context menu options are displaied when selecting a row, but the problem is that i need the number of the selected row . I tought that this could be achieved with the following source code in the onContextItemSelected( MenuItem item ) method :


but the AdapterContextMenuInfo is always null.

Could i achieve the table row by other method?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic