• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps how create main menu, and put the activity

This is pretty easy actually, I do it in my application, because at the beginning, you need to choose what solver you're looking for. I'm not sure what you're exactly trying to do, but check out Ultimath Beta in the app market, or look at the Ultimath post here, and if the main menu looks like what you're going for, I can help you further.
 
Upvote 0
Alright, so I'm in school and on my phone, so for now here's a quick overview of what this includes, and if its what your looking for.

So, first off, you start in what ill call a "main menu" method, which will be the first screen that opens on application launch. This will have your buttons that point to other activites, saying what the main menu is doing is directing you to another activity.

The main. Menu has buttons that will use intents to start another activity in the onClick, is this what your looking for? If so, ill continue but until then, just let me know
 
Upvote 0
you can go with just sam, anyway, sorry I work/school a ton, its pretty simple actually:

So what you do is pretty much have an activity called "mainScreen" or whatever you'd like, which has the buttons corresponding to each activity, and in each onClick, you add an intent that starts the next activity, corresponding with the button thats been clicked, for example:

you have 3 activities, location, distance, nearest

you have 3 buttons, pretty much the same thing, so when the button for location is pressed, you would start the location activity, which should be completely separate, so if you want, you can even call finish() before you call the intent so you dont end up with needless tasks running. I suggest putting a "main menu" or "back" button in each activity so that you can return, if you dont, just make sure that you dont use the finish() command or you will be backing out of the program: heres an example onClick that I'm speaking about:

Code:
private OnClickListener matrix = new OnClickListener() 
{
    public void onClick(View v) 
    {
    	finish();
    	Intent myIntent = new Intent(mainScreen.this, matrix.class);
    	mainScreen.this.startActivity(myIntent);
    }		    			    	
};

thats obviously after declaring the button, and the onClick listener. Let me know if you need more help, just let me know where you need it. if this helped, dont forget to thank!
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones