Android V7 Support Library Popup Menu -


i'm trying implement popupmenu support v7 library. compiles fine when try 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: must supply layout_height attribute.

which refers think "abc_popup_menu_item_layout.xml" 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 bug or do wrong?

you might want check if have appropriate theme specified in manifest file:

<application ... android:theme="@style/theme.appcompat"> 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -