Link to home
Start Free TrialLog in
Avatar of jagguy
jagguyFlag for Australia

asked on

menu or tab

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/
ASKER CERTIFIED SOLUTION
Avatar of for_yan
for_yan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jagguy

ASKER

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?
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.,,..