Instead of using AlertDialog
and assigning static dimensions and X|Y references on screen, I would suggest you to make use of PopupMenu
which is available in API-11 and above. As for older APIs, you may use support-v7 library.
For example and more info, read this and this.
Moreover, if the dropdown menu is supposed to be anchored from ActionBar, then I would suggest you to stick with the standard menu/group/item implementation rather than going the hard way.