Solved

menu or tab

Posted on 2012-03-26
3
390 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Here, we have shared an easy step by step tutorial on how to download instagram images and videos on PC, Android Mobile and iOS mobile.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

832 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