Gopikrishna S Gopikrishna S - 1 year ago 77
Android Question

Can I call setHasOptionsMenu() from Fragment Constructor?


from constructor, which is obviously called even before
, works perfectly! Can I do that? What will be problems?

Answer Source

Yes, you can call setHasOptionsMenu(true) from the constructor.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download