How can i launch an activity from the same activity under some condition using menu items. Eg:- I have an activity, which could be launch in two conditions based on the value boolean variable 'flag'. The value of this flag can be "true" or "false". If flag is "false" then in menu option icon/text for this activity should be disable. Means i should not be able to launch activity. And if flag is "true" then Menu option for this activity should be Enabled and i should be able to launch the same activity using menu items. (Note: In both the case activity should have same contents but only page header will be different.)
thanks,