registerForContextMenu(listview);
public void onCreateConetxtMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo){
菜单标题, 图标, 菜单项(menu.add()/getMenuInflater().inflater())
}
public void onContextItemsSelected(MenuItem item){
}
public void onCreateConetxtMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo){
菜单标题, 图标, 菜单项(menu.add()/getMenuInflater().inflater())
}
public void onContextItemsSelected(MenuItem item){
}
2016-04-28
OptionsMenu对应的activity,一个activity只能拥有一个选项菜单;
ContextMenu对应的是View,每个View都可以设置上下文菜单;
一般情况下ContextMenu常用于ListView或者GridView;
ContextMenu对应的是View,每个View都可以设置上下文菜单;
一般情况下ContextMenu常用于ListView或者GridView;
2016-04-28