Skip to content

Commit

Permalink
Fixed PopupMenu position bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mancj committed Aug 16, 2016
1 parent 44c965a commit b28d4ac
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void inflateMenu(int menuResource){
searchIcon.setLayoutParams(params);
menuIcon.setVisibility(VISIBLE);
menuIcon.setOnClickListener(this);
popupMenu = new PopupMenu(getContext(), findViewById(R.id.root));
popupMenu = new PopupMenu(getContext(), menuIcon);
popupMenu.inflate(menuResource);
popupMenu.setGravity(Gravity.RIGHT);
}
Expand Down

0 comments on commit b28d4ac

Please sign in to comment.