Android V7 Support Library Popup Menu
android, android-support-library
Solution
You might want to check if you have an appropriate theme specified in your manifest file:
<application ... android:theme="@style/Theme.AppCompat">
Problem
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); popup.getMenu().add(Menu.NONE,MENU_SHARE_A,1,R.string.A); popup.getMenu().add(Menu.NONE,MENU_SHARE_B,2,R.string.B); popup.show(); ``` an error occurs on call: 07-31 17:23:53.365: E/AndroidRuntime(14128): java.lang.RuntimeException: Binary XML file line #17: You must supply a layout_height attribute. Which refers I think to "abc_popup_menu_item_layout.xml" with this element: ``` <android.support.v7.internal.view.menu.ListMenuItemView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="?attr/dropdownListPreferredItemHeight" android:minWidth="196dip" android:paddingRight="16dip"> ``` Is this is a bug or do I do something wrong?