creating a menu after a long click event on a list view

前端 未结 7 663
無奈伤痛
無奈伤痛 2020-12-02 07:32

I have a list view connected to a database, showing a all the entries. I want a menu to show up if the user long clicks a item in the listview(database entry), showing optio

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-02 07:54

    You can call Activity.openOptionsMenu() in your click item method

    check here
    http://developer.android.com/reference/android/app/Activity.html#openOptionsMenu%28%29

提交回复
热议问题