Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onClick(View v) {
- if(v.getId() == R.id.action_reading) {
- PopupMenu popup = new PopupMenu(context, v);
- popup.setOnMenuItemClickListener(new OnMenuItemClickListener() {
- @Override
- public boolean onMenuItemClick(MenuItem arg0) {
- System.out.println("------ click menu");
- return false;
- }
- });
- popup.getMenuInflater().inflate(R.menu.action_reading_menu, popup.getMenu());
- popup.show();
- }
- }
- <Button android:id="@+id/action_reading"
- android:layout_width="30dp"
- android:layout_height="35dp"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"/>
- <?xml version="1.0" encoding="utf-8"?>
- <menu xmlns:android="http://schemas.android.com/apk/res/android" >
- <item android:id="@+id/delete_item_reading"
- android:title="Delete"
- android:visible="true"></item>
- </menu>
- java.lang.RuntimeException: Binary XML file line #17: You must supply a layout_height attribute.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement