Thursday, December 31, 2009

Opening and Closing Menu Programmatically

API for opening menu programmatically is openOptionsMenu(). If we are in a different context, then we can use this method by,

((Activity) mContext).openOptionsMenu();

For closing menu programmatically, if it opens use this,

((Activity) mContext).closeOptionsMenu();

No comments:

Post a Comment

Androidians