Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone- like tab bar in Android?

In iPhone we can create a view that has a tab bar and make it the root view of the application then use the tab bar to navigate through sub views.

what is the most close approach to this in Android?

Is it to use a Tabbed Control? but this includes using just one activity.

what is the approach to use in Android to create an activity with a navigation control to other activities in a way similar to that of the iPhone?

like image 911
Mina Wissa Avatar asked Jul 25 '10 20:07

Mina Wissa


3 Answers

There's a tutorial for creating a "Tab Layout" on the android dev site:

You can implement your tab content in one of two ways: use the tabs to swap Views within the same Activity, or use the tabs to change between entirely separate activities

Tab Layout
(source: android.com)

like image 99
binaryorganic Avatar answered Nov 15 '22 23:11

binaryorganic


Sorry, I really don't know the iPhone, but may a QuickAction Dialog help you??

http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/

I imagine a list of some activities in that dialog.

I hope this is close to what you want.

like image 30
Waza_Be Avatar answered Nov 15 '22 21:11

Waza_Be


There are a couple of examples around

http://www.anddev.org/code-snippets-for-android-f33/iphone-tabs-for-android-t14678.html

This one is scrollable http://code.google.com/p/mobyfactory-uiwidgets-android/

like image 22
androidworkz Avatar answered Nov 15 '22 23:11

androidworkz