Android Support Library V7 Popup-Menü

Ich versuche zu implementieren ist ein PopupMenu mit dem Support V7 Library. Alles kompiliert einwandfrei, aber wenn ich versuche zu nennen:

    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();

tritt ein Fehler auf Abruf:

07-31 17:23:53.365: E/AndroidRuntime(14128):
java.lang.RuntimeException: Binary XML file line #17: Sie müssen liefern
ein layout_height Attribut.

Bezieht sich denke ich "abc_popup_menu_item_layout.xml" mit diesem 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">

Ist das ein bug oder mache ich etwas falsch?

InformationsquelleAutor LeDon | 2013-07-31
Schreibe einen Kommentar