CheckBox and the ContextMenu
Posted
by anselmophil
on Stack Overflow
See other posts from Stack Overflow
or by anselmophil
Published on 2010-04-20T04:49:53Z
Indexed on
2010/04/20
4:53 UTC
Read the original article
Hit count: 304
Hi guys!
I have in a ListView with a ContextMenu, it has one CheckBox (the CheckBox has android:focusable="false") and one TextView per row, but you can hide the TextView in the preferences menu. After doing that, the CheckBox wasnt registering the ContextMenu, so of course, why not registerForContextMenu(cb) and unregisterForContextMenu(getListView())? Yes, i did that, but then, when when i call the delete command of onContextItemSelected, the app crashs.
AdapterContextMenuInfo info=(AdapterContextMenuInfo)item.getMenuInfo();
db.deletarTarefa(info.id);
So here i am, accepting ideias and help! :)
Thanks
© Stack Overflow or respective owner