Answer the question
In order to leave comments, you need to log in
How to switch between windows of an android application using the menu?
Friends, a question has arisen that is not really covered in any online tutorial: how to switch between windows using the menu?
So far, there are 3 options in my head.
Option 1: each window = Activity, copy-paste the menu in each Activity, i.e. onCreateOptionsMenu and onOptionsItemSelected methods. The option is clearly unnecessarily verbose, although it is working.
Option 2: see option 1, but arrange the menu as a separate class and inherit Activity from it. I don't really understand how to implement this.
Option 3 to do with the help of fragments, I also don’t really understand it yet.
More options?
Answer the question
In order to leave comments, you need to log in
BaseActivity
-> performs general functions (in your case, displays and processes the menu)
, etc.
Fragments. In general, there is no such UI pattern in android, why do you need it?
How exactly fragments - smoke mana and ask specific questions.
All options with activation are from the evil one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question