0

I want to write a clean, modern app. I've created several of apps and now have a simple question.

I want to create main menu to navigate app like on screen (not option menu / settings menu).

  1. Should I create it in MainActivity of app, or is there a better design patterns where should it be store?
  2. Is it good idea to create menu like this? Is it a good UI concept? I have to make an app, where user choose between 4 different activities, so I guess that is the best way?

enter image description here

klijakub
  • 845
  • 11
  • 31

1 Answers1

1

look into what a fragment is. have one main activity who's job is to load other fragments as the user clicks. So having the main menu itself in the mainActivity is ok but when the user clicks it should load another fragment to display the results.

I don't see anything wrong with creating a menu like this. Some users with smaller screens might have to scroll through unless you can make the boxes smaller for those devices. Or add a scrollview.

if your talking about clean architecture thats a huge other story and you can look into model view presenter architecture.

UPDATE: its recommended to user fragment for this instead of activity. Fragments allow for reusability. So if some of your screens have the same basic behavior you can re-use a fragment. If you think there not going to look alike at all you could just use all activities i suppose. I've used both ways.

You might run into a case where when the device changes orientation you want to show a master/detail view or some other kind of view. Fragments come in handely for this.

j2emanue
  • 60,549
  • 65
  • 286
  • 456
  • Thank You for your reply @j2emanue I have one question --> " So having the main menu itself in the mainActivity is ok but when the user clicks it should load another fragment to display the results." In my app when user clicks it loads a new activity via Intent (startActivity(intent);) Is it a bad technique? – klijakub Oct 30 '15 at 18:09
  • "Some users with smaller screens might have to scroll through unless you can make the boxes smaller for those devices" Of course it will be full responsive app prepared for smaller screens – klijakub Oct 30 '15 at 18:11