0

I'm building an Android app using Moxy MVP library.

When I try to build the project, I get compilation error:

"Activity contains non-void method "onCreateOptionsMenu" that return type is boolean"

That is simple onCreateOptionsMenu methdod to inflate the menu. Is there a way to use activity class containing this lifecycle method with Moxy Presenter?

Or what is the correct way to work with such lifecycle methods and Moxy?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Bord81
  • 525
  • 2
  • 8
  • 23
  • Could you explain your question? It's not clear – senneco Dec 26 '17 at 05:24
  • Is it possible to use standard options menu in an activity which extends MvpAppCompatActivity? Thanks. – Bord81 Dec 26 '17 at 14:26
  • Ofcourse it's possible =) But I can't help till you explain your problem: what you have and what you want? In many cases you shouldn't put `onCreateOptionsMenu` to your view interface. And shouldn't call this method from presenter. – senneco Dec 26 '17 at 21:45

0 Answers0