Solved

menu or tab

Posted on 2012-03-26
3
392 Views
Last Modified: 2012-06-27
IN android what is the diference between a menu / a tab or a button ?

If the menu option can load a file it then becomes to look like a tab?
IF the menu option does something on a click then it becomes a button ?

http://www.androidhive.info/2011/09/how-to-create-android-menus/
0
Comment
Question by:jagguy
3 Comments
 
LVL 47

Accepted Solution

by:
for_yan earned 500 total points
ID: 37769697
read this - it has the tour of different kinds of menus, options, etc.
http://developer.android.com/guide/practices/ui_guidelines/menu_design.html
0
 

Author Comment

by:jagguy
ID: 37769713
ok what I didnt find is where do i go when i select a menu option?

Can I run another java file somehow as the options in the examples I saw just run a few lines of code .

Do menu options usually poont to another file in android?
0
 
LVL 8

Expert Comment

by:Santhana
ID: 37770567
Hi jagguy,

Purpose of these 3 elements is different.... It is upto the programmer when to use what. Each one will have their own purpose.

Android provides different ways to give user interface to the user,,,,,
Menus
Menus are useful for displaying additional options that are not directly visible on the main UI of an application. There are two main types of menus in Android:
http://mobiforge.com/designing/story/understanding-user-interface-android-part-4-even-more-views
http://eagle.phys.utk.edu/guidry/android/androidUserInterface.html
http://developer.android.com/guide/topics/ui/menus.html

Button
Button is one of he common widget in android frame work.
Represents a push-button widget. Push-buttons can be pressed, or clicked, by the user to perform an action.
http://developer.android.com/reference/android/widget/Button.html
It is a direct widget/View. It will be always visible...

Tab
To create a tabbed UI, we need to use a Tab. It is generally a ActivityGroup.
It will be usefull to embad more than one activity into one activity group....

From your comment..
1)      If the menu option can load a file it then becomes to look like a tab?
IF the menu option does something on a click then it becomes a button ?

This is upto the programmers implementation. Instead of loading a different file/launching a different activity we can play some songs in the mediaplayer.

2)
http://www.androidhive.info/2011/09/how-to-create-android-menus/

what I didnt find is where do i go when i select a menu option?
Example from the above link  , They just showed a toast...
Once menu item is clicked the action for that menu item will be performed.
If you launch the differnt activity then current activity will be closed...If you just show the toast then it will show the toast( It will be in the same activity)

Can I run another java file somehow as the options in the examples I saw just run a few lines of code .
Yes you can.,,..
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ejb stateless example 2 40
Java 8 to Java 6 8 32
moto 4g plus phone how to delete videos and check space used 13 51
junit example issue 2 22
A short article about problems I had with the new location API and permissions in Marshmallow
You should read OS supplied guidelines before developing. I can't stress that enough. The guidelines will help you understand the reasons mobile app developers do what they do.  Apple is very particular when they review appstore submissions.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question