Is there a way to get the width and height of an Options Menu in DPI (or any other measurement)?
Is there a way to get the width and height of an Options Menu
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As I understand – NO.
When you open option menu new
Windowcreated – specially for showing menu. And from activity(and it’s window) there is not way to get some information about another windows.For controlling layout you can try to find layout of menu window, and check how many dp it is.(all standart android layouts is in folder sdk_folder/platforms/platform-x/data/res/layout) But this is not the best way – it will be platform-dependent, and if for example HTC provide there own option menus – you will have problems.