Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Actionbar

Can anybody help me...

I would like a actionbar above my tabinterface..
How can I implement an actionbar in my main xml..

I can't find any tutorial with a actionbar and tabinterface..

Thanks in advance!

like image 545
anddevelop Avatar asked Dec 13 '10 14:12

anddevelop


People also ask

What is an ActionBar in Android?

Android ActionBar is a menu bar that runs across the top of the activity screen in android. Android ActionBar can contain menu items which become visible when the user clicks the “menu” button.

What is the ActionBar?

In Android applications, ActionBar is the element present at the top of the activity screen. It is a salient feature of a mobile application that has a consistent presence over all its activities. It provides a visual structure to the app and contains some of the frequently used elements for the users.

What is the difference between ActionBar and toolbar?

The Toolbar is basically the advanced successor of the ActionBar. It is much more flexible and customizable in terms of appearance and functionality. Unlike ActionBar, its position is not hardcoded i.e., not at the top of an activity.


3 Answers

I have created a library, ActionBarSherlock, which is extended from the Android Compatibility Library to implement support for the native action bar all the way back to Android 1.6.

The key feature of this library is that it mimics the native action bar of Android 3.0+ and allows you to interact with it and theme it on all version of Android from 1.6 up through the current newest version, 3.1. There are samples and documentation on the website linked above which should give you a good idea about how it works.

You can also look on the implementations page on the GitHub wiki for real world applications of the library.

enter image description here

like image 54
Jake Wharton Avatar answered Sep 30 '22 09:09

Jake Wharton


The Google IO Schedule App has source code for both action bars, and action bars with a tab interface below it. http://code.google.com/p/iosched/

like image 26
Josh Clemm Avatar answered Sep 30 '22 08:09

Josh Clemm


Here are two projects that offer actionbar implementations:

https://github.com/johannilsson/android-actionbar

https://github.com/cyrilmottier/GreenDroid

like image 25
Intrications Avatar answered Sep 30 '22 08:09

Intrications