Android V7 Support Library Popup Menu

后端 未结 6 770
逝去的感伤
逝去的感伤 2020-12-09 19:06

I\'m trying to implement a PopupMenu with the Support V7 Library. All compiles fine but when I try to call:

    PopupMenu popup = new PopupMenu(this, v);
            


        
6条回答
  •  旧时难觅i
    2020-12-09 19:23

    Your layout file "abc_popup_menu_item_layout.xml" already shows a height defined.

    Either "?attr/dropdownListPreferredItemHeight" is something from a different theme or library (such as ActionBarSherlock), or the error is coming from a different layout file.

    Also, if you swap out "?attr/dropdownListPreferredItemHeight" for something like "60dp" does the error go away?

提交回复
热议问题