Android : Get view Reference to a Menu Item

前端 未结 6 729
醉酒成梦
醉酒成梦 2020-11-27 05:19

I plan to use quick actions UI pattern in my application. Android Quick Actions UI Pattern . The quick action window needs a pivot view to stick to.

    qui         


        
6条回答
  •  青春惊慌失措
    2020-11-27 05:39

    Old question, but I ran into some issues with the actionViewClass attribute. For anyone who runs into this later...

    Calling findViewById(R.id.mnu_item) in onOptionsItemSelected will return a View anchor.

    QuickActions on the MenuItems aren't good design, but I found that they are the simplest way to implement submenus with custom backgrounds.

提交回复
热议问题