close
floating context menu就是設定長按某個view之後
會彈出menu選單
介紹如下
1. 官網http://developer.android.com/guide/topics/ui/menus.html#groups
2. 使用時指要在指定的view上registerForContextMenu(目標View)
3. 然後在onCreateContextMenu內inflater該view
在onContextItemSelected內寫其callback
4. 就可以在長按目標view後跳出menu了
文章標籤
全站熱搜