F
F
foonfyrick2020-09-08 15:17:53
Android
foonfyrick, 2020-09-08 15:17:53

MVP how to correctly add onCreateOptionsMenu()?

Do I need to separate it when overriding the onCreateOptionsMenu() method? Or is it called in the activity, and buttons are added there, and onOptionsItemSelected() is processed in the same place? After all, there is a logic for adding buttons and their processing, but I don’t understand how to bring them out of the activity correctly and is it necessary?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
illuzor, 2020-09-08
@foonfyrick

That's right, only the button processing logic needs to be moved to the presenter. When you click in the presenter, report "such and such a button is pressed."

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question