why item.getMenuInfo() is null?
来源:互联网 发布:淘宝平台入驻协议 编辑:程序博客网 时间:2024/06/12 22:48
0down vote
getMenuInfo() will work on ListAdapter, not on views.
But, You can pass additional data with the tag of the view.
in getView: vi.setTag(position) activity.registerForContextMenu(vi);
declare in Activity private int id;
onCreateContextMenu: id = (int) v.getTag();
onContextItemSelected: you can use the id
add a comment
http://stackoverflow.com/questions/6190451/why-item-getmenuinfo-is-null
0 0
- why item.getMenuInfo() is null?
- why gpDesc is NULL?
- 关于typeahead中的item is null
- magento 1.9 Why is my wish list limited to one item?
- Why Ruby is Simple
- Why extends is evil
- Why is China angry?
- why is me?
- WHY IS GREP
- Why LD_LIBRARY_PATH is bad
- Why cacheAsBitmap is bad!
- Why LD_LIBRARY_PATH is bad
- Why system() is evil
- Why is ++[[]][+[]]+[+[]] = “10”-
- Why is tracking difficult?
- Why singleton is bad?
- React Native ListView的Item设置点击事件时null is not an object
- is null && is not null
- 在Ubuntu中通过update-alternatives切换软件版本
- C语言输入输出
- gitlab误删事件的反省,osx系统rm命令的代替方案
- hdu 4341 Gold miner (分组背包)
- [java]-[内存模型]
- why item.getMenuInfo() is null?
- [效率] 一套键盘鼠标控制两台计算机(校园网测试通过)
- hadoop入门
- JPA学习笔记【二】【helloworld】
- [android基础]《疯狂android讲义》重点整理(3)
- 欢迎使用CSDN-markdown编辑器
- 软件测试理论题目(一)
- iOS平台中OpenGL ES2相关知识积累
- MyBatis.1入门篇